0

I need to do a special action if the app was launched from the push notification.

There is a question for the ios: Detect if the app was launched/opened from a push notification , but what I need is a Cordova way for any platform. I saw the answers with the pause event usage, but I can't get where is a pause there - app is closed and then it is launching by push notification.

Community
  • 1
  • 1
Lanayx
  • 2,731
  • 1
  • 23
  • 35

1 Answers1

0

If you have configured plugin, event callbacks will be point of entry to your application .You can check through callbacks whether application was opened through notification or not. Here is documentation.

Mudasser Ajaz
  • 6,197
  • 1
  • 26
  • 29
  • How can they be called if the app is not running? Do you mean the callback should be called right after the app start? If yes, than I checked it and this doesn't happen – Lanayx Aug 23 '15 at 20:17
  • Thank you for the documentation link, found useful refer to the COLDSTART which should work. However it seems my windows phone doesn't raise ecb event after launch (checked using alert) – Lanayx Aug 23 '15 at 20:34
  • 1
    Just checked android, ecb is not called after start either. However, if app is running, ecb does get called. – Lanayx Aug 24 '15 at 06:45