Read More

Firebase Push Notification Integration With Flutter App

Firebase Push Notification is the service provided by Google for the developer. Notifications are actually messages that are sent to the users even if the application is closed to spread information, reminders and many more things. By these notifications, users can navigate to specific pages in the app.

For flutter, Google has provided a library for flutter to use the firebase push notification in it.

Let’s start with step by step procedure and integrate this library. I am assuming that you already have the knowledge to configure your project on the firebase console and get the google-services.json.

  1. Add the google-services.json inside your android/app folder.
  2. You need to add google services dependencies in your project level build.gradle.
  3. And google services plugin at the bottom of your [project]/android/app/build.gradle file.
  4. If you want to get the notification data in the app on notification tap then you will have to add an intent-filter in your <activity> tag.
  5. Now you will have to initialize the listeners and subscribe to topics and configure the tasks to be done on receiving notification taps. For that, you can use the below-provided helper class.
  6. After adding the above FirebaseNotifications class in your flutter project. You need to call its setUpFirebase function in your first state class.

This is all you need to do to get the notifications in your flutter application.

That’s all for this blog. Thank you very much. This is Vedesh Kumar signing off.

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close