Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid "Failure delivering result ResultInfo" when Intent is NOT null
    text
    copied!<p>I have a custom image preference in my Live Wallpaper that allows a user to choose an image from their SD card to use as a background. I got the code from <a href="https://stackoverflow.com/questions/3679330/choosing-background-for-live-wallpaper">here</a> and haven't modified it, so it's almost exactly the same except for variable or object names.</p> <p>I've been getting a few of these stack traces in my dev console:</p> <pre><code>java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=file:///mnt/sdcard/com.idunnolol.rageface/rage_fullpanel.png }} to activity {gilleland.software.pixelrain/gilleland.software.pixelrain.PixelRainSettings}: java.lang.NullPointerException at android.app.ActivityThread.deliverResults(ActivityThread.java:3515) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3557) at android.app.ActivityThread.access$2800(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2063) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at gilleland.software.pixelrain.PixelRainSettings.getRealPathFromURI(PixelRainSettings.java:107) at gilleland.software.pixelrain.PixelRainSettings.onActivityResult(PixelRainSettings.java:90) at android.app.Activity.dispatchActivityResult(Activity.java:3890) at android.app.ActivityThread.deliverResults(ActivityThread.java:3511) ... 11 more </code></pre> <p>I don't get this exception on my own phone.</p> <p>I've been searching for a while to figure out what's causing the NullPointerException but most of the solutions I have found involve "ResultInfo{who=null, request=1, result=-1, data=null}". The stack traces I'm getting actually have Intents with data...so I can't figure out what the NullPointerException is from.</p> <p>Any and all help is appreciated. I can provide any necessary code to help solve this. Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload