Is it possible to open a link by clicking on a notification sent by Firebase Cloud Messaging to a Flutter app (Android & iOS) while the app is closed? I am using Legacy HTTP Requests.
Is it possible to open a link by clicking on a notification sent by Firebase Cloud Messaging to a Flutter app (Android & iOS) while the app is closed? I am using Legacy HTTP Requests.
it's possible! You need to write listener for background service, it's actually already in the firebase_messaging package. Then you need to write function for launch url from your FCM notification. Learn FLUTTER_NOTIFICATION_CLICK
This is for example:
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
print('A new onMessageOpenedApp event was published!');
currentBottomIndex = 2;
goHome(context);
});