Did Android 5.0 Change The Result Of Action_image_capture Intent?
Intent captureImageIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(captureImageIntent, TAKE_FIRST_IMAGE_REQUEST_CODE); In onActivityResult(int request
Solution 1:
The code works fine on Android version < 5.0
No, it does not. It happened to work in your limited testing because the particular camera app you used happened to return a Uri
(presumably, the value you supplied via EXTRA_OUTPUT
). However, there is nothing in the documentation for ACTION_IMAGE_CAPTURE
that requires camera apps to return a Uri
. There are hundreds, perhaps thousands of camera apps, both pre-installed ones and ones installed from public channels like the Play Store. Do not rely upon getting a Uri
back in onActivityResult()
.
Anything changed in Android 5.0 that causes this?
Perhaps the camera app that you are using changed to no longer package the Uri
in the result. This is perfectly legitimate, per the documented protocol.
Post a Comment for "Did Android 5.0 Change The Result Of Action_image_capture Intent?"