arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1.01k stars 1.56k forks source link

Notification flow: another case #919

Open apps-albertozoccheddu opened 6 years ago

apps-albertozoccheddu commented 6 years ago

hello, it's possible to check if notification is present when user opens app?

THIS IS ACTUAL FLOW (WORKS GREAT) App is in background: User receives the notification message in its device notification bar User taps the notification and the app opens User receives the notification data in the JavaScript callback

THIS IS MY IDEA: App is in background: User receives the notification message in its device notification bar User opens the app WITHOUT TAP THE NOTIFICATION User find inside the app a icon badge alert User tap the icon badge alert inside the app and receives the data in the JavaScript callback

Best regards Alberto

RobinGiel commented 5 years ago

This can be achieved if you send or save the same notification data server side, so when the user goes to the notification page it will see that there's a unread notification. Maybe in a database you can create a table that says if users have tapped on the notification inside the app or not to remove the dot or badge.

Hanzofm commented 5 years ago

It would be a good enhacement because there are some cases wich server side is not modificable like a wordpress with Push plugin