Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The application is launched when click status bar notification, but does not detect coldstart state #179

Open
robagi opened this issue Mar 20, 2014 · 4 comments

Comments

@robagi
Copy link

robagi commented Mar 20, 2014

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 )"

@boltex
Copy link

boltex commented May 8, 2014

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!

@sandeepshetty
Copy link

Dup of #35

@gdelavald
Copy link

@boltex Make sure you initialize PushPlugin variable at onDeviceReady event.

 function onDeviceReady() {
    // Now safe to use the PhoneGap API
    pushNotification = window.plugins.pushNotification;

@boltex
Copy link

boltex commented May 12, 2014

Thank you, indeed initializing pushNotification sooner (before angularJS) when onDeviceReady fired made it work!

Many thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants