-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NotificationAppLaunchDetails returning true even after the app launch from recents. #1926
Comments
What you've described is still working as expected as the purpose of the method is to find out if was launched/started from a terminated state by a notification. This did happen from what got described but the app wasn't terminated again in the scenario. It was put in the background and you resumed the app by using the recents screen so the fact that it reported that a notification was used to start the app still remains true |
@MaikuB |
This will help https://www.youtube.com/watch?v=aQTvI8L-mZs |
@arv-aks I would suggest monitoring the app lifecycle events to help track that changes in the app or that you maintain state that you've dealt with the event. Was thinking recently to add a parameter that allows specifying if it should be consumed or not that would solve your issue. It would be something part of the current 14.0 prerelease and I'm happy to take a PR on this if you can help out on implementing this |
Would you also be able to provide a video that shows how this issue could be reproduced using the example app? I remembered there's a check on if the app was launched from recents at Line 1547 in 665c65e
|
I'll provide a video asap. And yes the launchedActivityFromHistory is present. |
Notewhat you tried to implement isn't what I was referring to. I was talking about the general app lifecycle, which is different to tracking how an app was launched. Another approach is your own app could track that a notification was processed to avoid reprocessing it again. As mentioned before at #1926 (comment) you are welcome to submit a PR to the plugin itself |
@MaikuB Hi, with my team we had the same issue. The history
We developed a fix for this issue but we can't push it, can you help us with this? |
This issue also happens when doing hot restart.
|
-> When the app is killed and tap on notification -> The app is opened and notificationAppLaunchDetails.didNotificationLaunchApp = true. Thats working fine.
-> When the app is in memory (i.e. background) and I opened other apps. After sometime I click on this app icon to launch. Then the app restarted (from recents) and the value of notificationAppLaunchDetails.didNotificationLaunchApp = true. Which should be false, because the app is not opened from notification and the payload is also receiving which is the payload of previous notification
The text was updated successfully, but these errors were encountered: