case CROP_FROM_CAMERA:
if(mImageCaptureUri!=null){
Bundle extras = data.getExtras();
if (extras != null) {
Bitmap photo = extras.getParcelable("data");
bmp = photo;
}
builder.setOnCancelListener( new DialogInterface.OnCancelListener() {
@Override
public void onCancel( DialogInterface dialog ) {
if (mImageCaptureUri != null ) {
getContentResolver().delete(mImageCaptureUri, null, null );
mImageCaptureUri = null;
}
}
} );
When I am trying cancell cropped image I receive null pointer exception in Bundle extras=data.getExtras(); What should I do here to avoid this problem. Is there any solution here?
You also get a result code which tells you if it went okay:
Tada! 😀