Reputation: 2100
I'm working on push notifications for Android and everything is working pretty good.
When app is open and active or closed, push notifications are working as expected.
When app is open but working on background - the push notification is received, but there are two possible outcomes here:
It would be expected that the notification will be removed when the app opens from on background, but it just stays there on top. And when clicked, the notification disappears and no data is received from it.
I wonder how you clever guys have solved it? I heard of the cordova background mode plugin, but I'm not sure whether it's the right solution to jump right into it. I guess I could get the data from the server instead, but what about removing the notification from the taskbar?
Much thanks for any help.
Upvotes: 0
Views: 397
Reputation: 2100
Sorry for the trouble, so I found out about this 'resume'
event from cordova, that actually gets called whenever the app is coming from background mode.
That is just the functionality I was looking for. Maybe it'll help someone someday. ;)
Upvotes: 0