Recall & Review
beginner
What does 'notification handling in foreground' mean in Firebase?
It means managing how notifications are received and shown when the app is open and active on the screen.
Click to reveal answer
beginner
Which Firebase service is used to send notifications to apps?
Firebase Cloud Messaging (FCM) is used to send notifications to apps on different devices.
Click to reveal answer
intermediate
Why do notifications need special handling when the app is in the foreground?
Because the app is already open, notifications won’t show automatically in the system tray, so the app must decide how to display or handle them.
Click to reveal answer
intermediate
How can you show a notification in the app when it is in the foreground using Firebase?
You listen for messages using Firebase messaging listeners and then create a local notification or update the UI to alert the user.
Click to reveal answer
beginner
What is a common method to listen for foreground messages in Firebase Cloud Messaging?
Using the onMessage() method from Firebase messaging SDK to catch messages while the app is active.
Click to reveal answer
What happens to notifications sent via Firebase when the app is in the foreground by default?
✗ Incorrect
When the app is open (foreground), notifications are received but not shown automatically. The app must decide how to display or handle them.
Which Firebase method is used to listen for messages when the app is active?
✗ Incorrect
The onMessage() method listens for messages when the app is in the foreground.
Why might you want to show a custom alert inside the app for foreground notifications?
✗ Incorrect
Showing a custom alert helps users see important info right away without waiting for system notifications.
What is Firebase Cloud Messaging mainly used for?
✗ Incorrect
Firebase Cloud Messaging is designed to send notifications and messages to apps on devices.
If you want to handle notifications differently when the app is open, what should you do?
✗ Incorrect
Using onMessage() lets you catch notifications in the foreground and show custom alerts or UI.
Explain how Firebase handles notifications when the app is in the foreground and what you need to do to show them to users.
Think about what happens when the app is open and how you can still alert the user.
You got /3 concepts.
Describe the role of Firebase Cloud Messaging in notification handling and why foreground handling is important.
Consider how messages reach the app and what changes when the app is active.
You got /3 concepts.