Note that there are some explanatory texts on larger screens.

plurals
  1. POProgram crashes when user presses back button while taking a picture
    primarykey
    data
    text
    <p>I'm using intents and I'm wondering why my application keeps crashing when they press the back button. I have tried:</p> <pre><code>if(data.getExtras() != null) </code></pre> <p>but that still doesn't work. Is there a more correct way to do this?</p> <p>Oops, sorry for not being specific. D:</p> <p>Stacktrace:</p> <pre><code>E/AndroidRuntime(19352): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1337, result=0, data=null} to activity {com.smilingdevil.Day5/com.smilingdevil.Day5.BopActivity}: java.lang.NullPointerException E/AndroidRuntime(19352): at android.app.ActivityThread.deliverResults(ActivityThread.java:2883) E/AndroidRuntime(19352): at android.app.ActivityThread.handleSendResult(ActivityThread.java:2925) E/AndroidRuntime(19352): at android.app.ActivityThread.access$2000(ActivityThread.java:132) E/AndroidRuntime(19352): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1063) E/AndroidRuntime(19352): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(19352): at android.os.Looper.loop(Looper.java:143) E/AndroidRuntime(19352): at android.app.ActivityThread.main(ActivityThread.java:4196) E/AndroidRuntime(19352): at java.lang.reflect.Method.invokeNative(NativeMethod) E/AndroidRuntime(19352): at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime(19352): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) E/AndroidRuntime(19352): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) E/AndroidRuntime(19352): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(19352): Caused by: java.lang.NullPointerException E/AndroidRuntime(19352): at com.smilingdevil.Day5.BopActivity.onActivityResult(BopActivity.java:167) E/AndroidRuntime(19352): at android.app.Activity.dispatchActivityResult(Activity.java:4010) E/AndroidRuntime(19352): at android.app.ActivityThread.deliverResults(ActivityThread.java:2879) E/AndroidRuntime(19352): ... 11 more W/ActivityManager( 1337): Force finishing activity com.smilingdevil.Day5/.BopActivity </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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