0% found this document useful (0 votes)
9 views

Push Notifications

This document discusses how to implement push notifications in a Flutter app using Firebase messaging. It explains that push notifications allow app publishers to send small messages to users even when they are not using the app. It then lists the required Firebase and Flutter plugins and provides steps to create a new Firebase and Flutter project, configure Firebase messaging, send a test notification, and handle notifications when the app is in the foreground or background.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Push Notifications

This document discusses how to implement push notifications in a Flutter app using Firebase messaging. It explains that push notifications allow app publishers to send small messages to users even when they are not using the app. It then lists the required Firebase and Flutter plugins and provides steps to create a new Firebase and Flutter project, configure Firebase messaging, send a test notification, and handle notifications when the app is in the foreground or background.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

FLUTTER

PUSH NOTIFICATIONS
US I NG FI REBAS E ME S S AGI NG

BY: RASHI D WASSAN


LI NKEDI N. COM/I N/RASHI DWASSAN
INTRODUCTION
PUSH NOTIFICATIONS ARE SMALL MESSAGES THAT
POP UP ON A USER'S DEVICE. APP PUBLISHERS AND
WEBSITE OWNERS CAN SEND THEM AT ANY TIME,
AND USERS DON’T HAVE TO BE IN THE APP / ON
THE WEBSITE TO RECEIVE THEM.
PLUGINS REQUIRED

1 F I R EBASE_MES S AGI N G
To use the meth ods p rovi d ed t o i n t era ct
wi t h F i rebase Mes s a g i n g s erv i ce i n cl oud .

2 F LU TTER_LO CAL _N O T I F ICA TIO N S


To show noti f i c a ti on s when d a t a (mes s a ge)
i s r ecei ved i n f oreg roun d.

3 F I R EBASE_CO R E
Mai n p l ug i n wh i c h a c ti v at es a n d
r es ponsi bl e f or h a n dl i n g a l l Fi reb a s e
op e rati ons i n th e a p p .
Create a new Flutter project
Create a new Firebase project
Configure Firebase with Project
Add Flutter Notification Intent in Manifest
Send Test Notification
1: NEW FIREBASE PROJECT (ANALYTICS ENABLED - OPTIONAL)
2: NEW FLUTTER PROJECT WITH FIREBASE INTEGRATION
3: CHOOSE CLOUD MESSAGING FROM THE ALL PRODUCTS SCREEN
4: CREATE THE FIRST CAMPAIGN
5: USE FIREBASE NOTIFICATION MESSAGES
1: ADD NOTIFICATION TITLE, DESCRIPTION, AND BASIC INFO, CLICK NEXT
2: SET THE TARGET APP WHICH WILL RECEIVE NOTIFICATION
Use additional data in
notifications for
voucher codes, the
number of coins in a
game that the user has
been rewarded with.

OPTIONAL: ADD DATA IN MAP FORM FOR FURTHER INFO TRANSFER


3: SCHEDULE, REVIEW, AND PUBLISH
THE CAMPAIGN IS ACTIVE NOW!
Firebase by default will not send the notification in foreground mode.
INTENT
Add this code in Android Manifest if you have any issues
displaying notifications when app is in the background.

<INTENT-FILTER>
<ACTION ANDROID:NAME="FLUTTER_NOTIFICATION_CLICK" />
<CATEGORY ANDROID:NAME="ANDROID.INTENT.CATEGORY.DEFAULT"
/>
</INTENT-FILTER>
I/flutter (13541): {redeemCode: 324789237489-937-32, voucherID: 2738942}

*The output is based on the data that we sent in previous step.


REMEMBER
AND,
SO,
IN PREVIOUS SLIDE,
Thank you!

linkedIn.com/in/rashidwassan

You might also like