0
0
Firebasecloud~5 mins

Notification handling in foreground in Firebase - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AThey automatically show in the system notification tray.
BThey are ignored and not received by the app.
CThey are received but not shown automatically; the app must handle them.
DThey cause the app to close.
Which Firebase method is used to listen for messages when the app is active?
AonBackgroundMessage()
BonMessage()
CsendNotification()
DreceiveMessage()
Why might you want to show a custom alert inside the app for foreground notifications?
ATo provide a better user experience by showing relevant info immediately.
BTo save battery life.
CBecause system notifications are blocked in the foreground.
DTo prevent the app from crashing.
What is Firebase Cloud Messaging mainly used for?
ASending notifications and messages to apps.
BBuilding user interfaces.
CManaging app databases.
DStoring user data.
If you want to handle notifications differently when the app is open, what should you do?
ASend notifications only when the app is closed.
BIgnore all notifications.
CDisable Firebase messaging.
DUse onMessage() to catch notifications and show custom 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.