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?
✗ Incorrect
The firebase_messaging package is specifically designed to integrate FCM in Flutter apps.
What must you do on iOS before receiving push notifications?
✗ Incorrect
iOS requires explicit user permission to show notifications, so you must request it.
What does the device token represent in FCM?
✗ Incorrect
The device token uniquely identifies the device for sending targeted notifications.
Which method listens for messages when the app is running in the foreground?
✗ Incorrect
onMessage.listen() handles incoming messages while the app is open.
What is the first step to set up FCM in a Flutter app?
✗ Incorrect
You must add the package and connect your app to Firebase before handling notifications.
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.