I have an android app which gives the user the option of loading a picture from the SD card. The problem is that, after they have clicked “load from SD” and are presented with the “open with Gallery or File manager”, if they press back the App locks up.
I have this report from logcat, if anybody has any idea I would greatly appreciate it !!
03-25 16:13:04.915: E/AndroidRuntime(1389): java.lang.RuntimeException:
Failure delivering result
ResultInfo{who=null, request=2, result=0, data=null}
to activity {my.img.project/my.img.project.projActivity}:
java.lang.NullPointerException
The app crashes in the “onActivityResult” method, I presume because it does not have a way to handle the back button ???
Hard to know without the code, but I would bet you don’t handle the “cancel” case, when the result data is
null. Just check that the result data is not null before trying to access it.