我尝试以这种方式从相机拍照:
private void photo() {
String storageState = Environment.getExternalStorageState();
if (storageState.equals(Environment.MEDIA_MOUNTED)) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
String directory = Environment.getExternalStorageDirectory()
.getName() + File.separatorChar + "app/photo/";
mPushFilePath = directory + System.currentTimeMillis() + ".jpg";
File imageFile = new File(mPushFilePath);
Uri mImageFileUri = Uri.fromFile(imageFile);
intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
mImageFileUri);
startActivityForResult(intent, CAMERA_RESULT);
}
}
onActivityResult
我从路径中的方法中拍照mPushFilePath
在所有设备中,这段代码都能完美运行。但是在Lenovo A750中,当我尝试获取图片时,按钮v(或ok)不起作用。请帮我解决这个问题。