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
When clicking on a notification, if the app is using GoRouter (it handles deep links out of the box), on Android the app redirects to the launch URL, as if the user clicked on a deep link. But on iOS the launch Url is not provided to the app navigator and we need to use OneSignal.Notifications.addClickListener to detect the clicks on the notification. This is the case if the app is in the foreground, background, or terminated.
Steps to reproduce?
1. Create a flutter app.
2. Add GoRouter.
3. Add a Redirect to GoRouter that just prints the url.
3. Initialize OneSignal etc.
4. Send a notification with a LaunchUrl to the app, the URL could be anything, a valid URL or not.
5. Run on Android and iOS and see the prints only in Android.
6. Add `OneSignal.Notifications.addClickListener`.
7. Send notifications again and see it trigger on Both Platforms.
8. Test and see the same results when the app is in the foreground, background or terminated.
What did you expect to happen?
OneSignal notifications launchUrl should be consistent across platforms, either open the URL as if it is a deep link or don't. And if it is not, that should be properly documented.
OneSignal Flutter SDK version
onesignal_flutter: ^5.2.0
Which platform(s) are affected?
iOS
Android
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
jkasten2
changed the title
[Bug]:
[Bug]: LaunchUrl click behavior is inconsistent between Android and iOS with GoRouter
Jul 12, 2024
What happened?
When clicking on a notification, if the app is using GoRouter (it handles deep links out of the box), on Android the app redirects to the launch URL, as if the user clicked on a deep link. But on iOS the launch Url is not provided to the app navigator and we need to use
OneSignal.Notifications.addClickListener
to detect the clicks on the notification. This is the case if the app is in the foreground, background, or terminated.Steps to reproduce?
What did you expect to happen?
OneSignal notifications launchUrl should be consistent across platforms, either open the URL as if it is a deep link or don't. And if it is not, that should be properly documented.
OneSignal Flutter SDK version
onesignal_flutter: ^5.2.0
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: