katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin
Apache License 2.0
2.56k stars 1.75k forks source link

App crash Android, NullPointer Exception after clicking on a Notification when application was in background #53

Closed sebastianzillessen closed 10 years ago

sebastianzillessen commented 10 years ago

Hello,

I attached a local notification and closed the app completely. When it comes back through clicking on the notification the entire application crashes:

W/dalvikvm( 5776): threadid=11: thread exiting with uncaught exception (group=0x415cdba8)
W/System.err( 5776): java.lang.NullPointerException
W/System.err( 5776):    at de.appplant.cordova.plugin.localnotification.ReceiverActivity$1.run(ReceiverActivity.java:91)
W/System.err( 5776):    at java.util.Timer$TimerImpl.run(Timer.java:284)
W/FlurryAgent( 5776): Error logged: uncaught
W/FlurryAgent( 5776): Ending session
V/GmsNetworkLocationProvi(  999): onSetRequest: ProviderRequestUnbundled, reportLocation is true and interval is 60000
V/GmsNetworkLocationProvi(  999): SET-REQUEST
V/GmsNetworkLocationProvi(  999): in Handler: ProviderRequestUnbundled, reportLocation is true and interval is 60000
E/AndroidRuntime( 5776): FATAL EXCEPTION: Timer-0
E/AndroidRuntime( 5776): Process: de.myapp.app,´, PID: 5776
E/AndroidRuntime( 5776): java.lang.NullPointerException
E/AndroidRuntime( 5776):    at de.appplant.cordova.plugin.localnotification.ReceiverActivity$1.run(ReceiverActivity.java:91)
E/AndroidRuntime( 5776):    at java.util.Timer$TimerImpl.run(Timer.java:284)
W/ActivityManager(  609):   Force finishing activity de.myapp.app/.App

Can you help me with that?

katzer commented 10 years ago

I think the app was not running while clicking on the notification?

sebastianzillessen commented 10 years ago

Yes.

katzer commented 10 years ago

Should work now (421b2df5452e0ec672d627889e5bf0824a56c67c)