FCM push notifications FLUTTER when app is terminated
first answer, I hope will be good.
As you can see here notifications are handled with onBackgroundMessage even if the app is terminated. Maybe your problem is that you are not sending a Notification but a "Data only" message. In that case you have to set the field "priority": "high"
Also, with the latest release of Flutter and firebase_messaging the methods onResume, onMessage and onLaunch are deprecated. You should substitute them with onMessage, onMessageOpened, onBackground, but you can find definitely more info with the official documentation
kingkobain99
Updated on December 28, 2022Comments
-
kingkobain99 over 1 year
I am trying to receive push notifications on ANDROID from the Firebase console when the app is terminated but I get nothing (I have onResume, onMessage and onLaunch callback listeners but I don’t even want to handle them in the app yet) I’d just like to get them to show In the tray or lock screen. Is there some Android configuration required?
-
Pratik Butani about 3 yearsYou can test it from Postman: Check it out Test FCM Notification with Postman
-
-
gowtham6672 over 2 yearsthanks. i always forget this