Home > database >  What's the difference between tapping notification when app is on background and terminated
What's the difference between tapping notification when app is on background and terminated

Time:09-28

When tapping the notification with message data through type 3 (open app), the message data are all get from onNewIntent method, is there any difference between when the app is on background and terminated?

If tapping the notification when app is on background, it will reset to the initial screen or keep the previous route path?

CodePudding user response:

WHen you tap on the notification, it will go to the Intent your specified when creating the notification. There is no difference there. If the app was terminated, it will need to be restarted. In that case any data that was present in memory will have been lost, so anything you need to handle the notification will need to have been written to disk.

  • Related