In my android app I employ a camera activity which sometimes works and sometimes doesn\'t. About 30% of the time the uri set up to store the photo comes back with a null va
Can anyone explain why this could happen
ACTION_IMAGE_CAPTURE does not return a Uri, according to the documentation. data.getData(), in your code, should always be null. If it is not null, what that Uri means is undocumented.
how to resolve it?
You already know what the Uri is. You put it in EXTRA_OUTPUT. Use that.
I didn't use to have this problem.
Yes, you did. There are thousands of Android device models. These ship with dozens, if not hundreds, of camera applications built in. There are dozens, if not hundreds, of additional ACTION_IMAGE_CAPTURE-supporting apps available for download, from places like the Play Store. None of them have to return a Uri, since the documentation does not say that they have to return a Uri (and, even then, there are bugs in camera apps).