There are several ways to send notifications through Firebase Messaging, including through http. There are also SDKs in different languages, including Java, C#, Python, JavaScript and Go. But the simplest way to test your app is sending a message through the Firebase Console. Before sending the notification, make sure your app is running.
So, get to your Firebase Console and click the “Cloud messaging” link: from there, just click “New Notification”.
Add a notification title, for example “Test notification”, and a body, like: “This is the body”. Just skip the optional image and name and click the next button. In the target, choose your Android app.
If you configured iOS as well, click the “Target another app” button, and add your iOS app. Then click next.
For the scheduling, just leave “now”. Note that you can also schedule your notifications and make them recurring. Press the Review button, check whether everything is correct.
Now we want to test the notification on the foreground: so let’s make sure the app is running and the device is not locked. Then press “Publish”. Here you might have to wait a few seconds.
Now let’s get to the Debug console of our app: you should be able to see the notification details messages that you set up before. In order to make sure that this works on the background as well, send another notification from the Firebase console after pressing the home button on your device. I won’t bore you with the process again: let’s just have a look at the messages you should see printed on the debug console. Of course you should test each target device as well.
Great this completes this course on FlutterFire. I really hope you enjoyed it as much as I enjoyed writing it. Keep coding!