You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
i open similar issue about one of my problems earlier and i thought problem was solved with 1.0 release but i was wrong.
i have 2 problems with the plugin.
when sending notifications if app is in foreground "onMessageReceived" kicks in and i can get all the data i sent.if app is close i get a tray icon message and when i click it i can get the data part of my notification with;
application.on(application.resumeEvent, function(args) {
if (args.android) {
var act = args.android;
var intent = act.getIntent();
var extras = intent.getExtras();
if (extras) {
var msg = extras.get('mykey');
}
}
});
this works too.
Now my problems are
1)after you get notification with above code when your app close if you send your app background then foreground manually above code still gets the notification data so how can i differentiate if app is resuming manualy or with clicking the tray message.Do i have to save all notifications to the phone so that i try to look if i process this notification or not. in the short run this can be possible but in the long run with hundreds of messages or thousands of messages send this will be quite a burden for this app.
2)if you send notification when your app is background neither "onMessageReceived" nor "application.resumeEvent" gets the data you are sending. how can we read send data when app is in the background and not close.
thanks for advance.