我正在使用这段代码:
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
File photo = new File("/sdcard/picture.png");
intent.putExtra(MediaStore.EXTRA_OUTPUT,
Uri.fromFile(photo));
Uri imageUri = Uri.fromFile(photo);
startActivity(intent);
我想将此 Intent 与预定义设置一起使用,例如每次我启动相机时默认为正面。这可能吗?
最佳答案
这是前置摄像头的 Intent ,在你的代码中使用它! 这是一个很好的教程:http://www.vogella.com/articles/AndroidCamera/article.html
int CAMERA_FACING_FRONT
在这里阅读更多:http://developer.android.com/reference/android/hardware/Camera.html
关于android - 默认情况下,Android 相机中的正面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15790759/