Hello,

I'm testing the push plugin. It works as expected for iOS in both background and foreground.
It works as expected for Android in foreground but crashes the app when it's in background or is not active - popups message 'Unfortunately app has stopped', sending the same message.

From the log I could find:

D/NotificationMessageHandler( 3571): onMessage - context: android.app.ReceiverRestrictedContext@42096d20

W/dalvikvm( 3571): threadid=11: thread exiting with uncaught exception (group=0x416d5da0)

E/AndroidRuntime( 3571): FATAL EXCEPTION: Thread-18175

E/AndroidRuntime( 3571): Process: io.cordova.hellocordova, PID: 3571

E/AndroidRuntime( 3571): java.lang.NullPointerException

E/AndroidRuntime( 3571): at org.jboss.aerogear.cordova.push.NotificationMessageHandler.onMessage(NotificationMessageHandler.java:40)

E/AndroidRuntime( 3571): at org.jboss.aerogear.android.unifiedpush.Registrations$1.run(Registrations.java:149)

E/AndroidRuntime( 3571): at java.lang.Thread.run(Thread.java:841)


I appreciate your help.