You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It used to work fine but after some time (I guess due to cordova / cordova-android update or other reason)
it crashes on onActivityResult
some logs:
01-21 08:50:36.055 8646 8646 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=0, data=null} to activity { ... MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Bundle android.content.Intent.getExtras()' on a null object reference
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4342)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:4385)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.app.ActivityThread.-wrap19(Unknown Source:0)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1657)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.os.Looper.loop(Looper.java:251)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6589)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Bundle android.content.Intent.getExtras()' on a null object reference
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at com.lampa.startapp.startApp.onActivityResult(startApp.java:391)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:159)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:359)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:7235)
01-21 08:50:36.055 8646 8646 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4338)
it seems onActivityResult intent argument arrives as null
It used to work fine but after some time (I guess due to cordova / cordova-android update or other reason)
it crashes on onActivityResult
some logs:
it seems onActivityResult intent argument arrives as null
replacing
Bundle bundle = intent.getExtras();
with
Bundle bundle = intent == null ? null : intent.getExtras();
helps
Other info:
The text was updated successfully, but these errors were encountered: