============ Problem Description ============
I call the camera of the Android system:
Uri uri = uri.fromfile (new File (ImagePath));
Intent Intent = new Intent (mediastore.action_image_capture);
Intent.putextra (Mediastore.extra_output, URI);
Mactivity.startactivityforresult (intent,2);
The system camera is turned on, and the Onactivityresult (int requestcode, int resultcode,intent data) method is rewritten.
@Override
public void Onactivityresult (int requestcode, int resultcode,intent data) {
Super.onactivityresult (Requestcode, ResultCode, data);
if (Requestcode = = 2 && ResultCode = = RESULT_OK)
{
Cameraview.iview.setImageURI (Uri.fromfile (New File (Cameraview.imagepath)));
Bitmap bmp = (Bitmap) Data.getextras (). Get ("data");
LOG.D ("Test", "bmp width" + bmp.getwidth () + ", Height:" + bmp.getheight ());
}
}
After I take a photo, click the Confirm button and nothing happens. Click the Cancel button to callback the Onactivityresult method.
Please teach the great God, why click "Confirm" no callback Onactivityresult method????
============ Solution 1============
http://blog.csdn.net/shen332401890/article/details/9313379
Please refer to
In addition, what is the launchmode of your application? Default?
Besides, try the upstairs statement without judging the conditions.
Call the Android camera execution result without callback Onactivityresult ()