Beginning FlutterFire

Aug 30 2022 · Dart 2.16, Flutter 3.0, Visual Studio Code 1.69

Part 5: Add Notifications with Firebase Cloud Messaging

24. Send Notifications from the Firebase Console

Episode complete

About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 23. Set Cloud Messaging Permissions on iOS

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Transcript: 24. Send Notifications from the Firebase Console

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!