Open robagi opened 10 years ago
I have the sam problem. Did you fixed it?
I notice in my debug console i get : D/CordovaLog(5754): file:///android_asset/www/cordova.js: Line 1036 : processMessage failed: Stack: ReferenceError: onNotificationGCM is not defined.
It tries to process the notification before my application finishes initializing the notification plugin!
Dup of #35
@boltex Make sure you initialize PushPlugin variable at onDeviceReady event.
function onDeviceReady() {
// Now safe to use the PhoneGap API
pushNotification = window.plugins.pushNotification;
Thank you, indeed initializing pushNotification sooner (before angularJS) when onDeviceReady fired made it work!
Many thanks again!
Everything works perfectly, notifications are received and launched in the status bar and they open my application when touched.
The code is on the main page of my application that opens when you tap the notification and successfully show labels "INLINE NOTIFICATION" and "BACKGROUND NOTIFICATION" whichever is applicable
The problem comes when my application is off (meaning coldstate) , the application is launched successfully but does not run the action inside the "if ( e.coldstart )"