0
0
Fluttermobile~5 mins

Push notifications (FCM) in Flutter - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Firebase Cloud Messaging (FCM)?
FCM is a free service by Google that lets apps send notifications and messages to users across Android, iOS, and web platforms.
Click to reveal answer
beginner
Which Flutter package is commonly used to integrate FCM?
The firebase_messaging package is used to add Firebase Cloud Messaging support in Flutter apps.
Click to reveal answer
intermediate
How do you request permission for notifications on iOS in Flutter?
Use FirebaseMessaging.instance.requestPermission() to ask the user for notification permissions on iOS devices.
Click to reveal answer
beginner
What is a device token in FCM?
A device token is a unique ID that FCM uses to send notifications to a specific device.
Click to reveal answer
intermediate
How can you handle a notification when the app is in the foreground?
Use FirebaseMessaging.onMessage.listen() to listen for messages and show custom UI or alerts when the app is open.
Click to reveal answer
Which package do you add to your Flutter app to use Firebase Cloud Messaging?
Aflutter_local_notifications
Bfirebase_messaging
Chttp
Dfirebase_auth
What must you do on iOS before receiving push notifications?
ARequest user permission for notifications
BEnable background fetch
CInstall Google Play Services
DNothing, it works automatically
What does the device token represent in FCM?
AA unique identifier for the device to receive messages
BThe app version number
CThe user's email address
DThe Firebase project ID
Which method listens for messages when the app is running in the foreground?
AFirebaseMessaging.subscribeToTopic()
BFirebaseMessaging.getInitialMessage()
CFirebaseMessaging.onMessage.listen()
DFirebaseMessaging.requestPermission()
What is the first step to set up FCM in a Flutter app?
ARequest notification permission
BWrite notification UI code
CCreate a new Flutter widget
DAdd firebase_messaging package and configure Firebase project
Explain the steps to receive push notifications using FCM in a Flutter app.
Think about setup, permissions, and message handling.
You got /5 concepts.
    Describe how to handle a notification when the app is open versus when it is closed.
    Consider different app states and corresponding listeners.
    You got /4 concepts.