我尝试用相机拍照:
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
中拍照
在所有设备中,此代码完美运行。但是在联想A750 中,当我尝试获取图片时,按钮 v (或确定)不起作用。请帮我解决这个问题。
答案 0 :(得分:0)