Recall & Review
beginner
What is the purpose of
expo-notifications in React Native?It is a library that helps apps send and receive push notifications easily on both iOS and Android devices.
Click to reveal answer
beginner
Which method is used to get the device's push notification token with
expo-notifications?The method
getExpoPushTokenAsync() returns a unique token to send push notifications to that device.Click to reveal answer
beginner
Why do you need to ask for permissions before sending push notifications?
Because users must allow the app to show notifications. Without permission, notifications won’t appear.
Click to reveal answer
intermediate
What is the role of a notification handler in
expo-notifications?It controls how notifications behave when received, like showing alerts or playing sounds.
Click to reveal answer
intermediate
How can you listen for incoming notifications while the app is running?
By adding a listener with
addNotificationReceivedListener to react when notifications arrive.Click to reveal answer
Which function gets the push notification token in Expo?
✗ Incorrect
getExpoPushTokenAsync() returns the device token needed to send push notifications.
What must you do before showing notifications to the user?
✗ Incorrect
Users must grant permission before the app can display notifications.
Which listener lets you react when a notification arrives while the app is open?
✗ Incorrect
addNotificationReceivedListener triggers when a notification is received in the foreground.
What does the notification handler control?
✗ Incorrect
The notification handler defines if notifications show alerts, sounds, or badges.
Which platform(s) does
expo-notifications support?✗ Incorrect
expo-notifications works on both iOS and Android devices.
Explain the steps to set up push notifications using expo-notifications in a React Native app.
Think about permissions, token, handlers, and listeners.
You got /5 concepts.
Describe how you would handle a notification when the app is open versus when it is closed.
Consider different app states and listeners.
You got /3 concepts.