onMessageOpenedApp or onSelectNotification callbacks when app is in Foreground #6116
Unanswered
larinnim
asked this question in
Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There are not callbacks like "onMessageOpenedApp" for Foreground.
To redirect the user to a new screen we need to implement onSelectNotifications from flutter_local_notifications. However, this conflicts with firebase_messaging as the RemoteMessage is keep being called back if the notification is open from the background. So basically you need to choose if you redirect the user when you are in foreground or background.
Any insights on how to redirect the user to a specific page on foreground and background would be appreciated.
await flutterLocalNotificationsPlugin.initialize(initializationSettings,
onSelectNotification: (String? payload) async {
});
Beta Was this translation helpful? Give feedback.
All reactions