Let's think about it this way for a second
The high-level push notification workflow: (1) the app requests permission, (2) it obtains a unique device 'push token', (3) that push token is sent to and stored on a backend server, (4) when some event happens (a message arrives, an order is confirmed), the backend uses the push token to send a notification through a push service like Expo/FCM/APNs. It's important to distinguish local notifications (scheduled by the device itself) from remote/push notifications (triggered by the server).
Let's connect this to a real-world scenario
Install expo-notifications and call Notifications.requestPermissionsAsync() — a permission dialog appears, and once granted, Notifications.getExpoPushTokenAsync() gives you a unique token — this token needs to be stored in a backend database, tied to the user record. Local notifications (e.g. reminders) don't need a backend at all — you can schedule them right on the device with Notifications.scheduleNotificationAsync().
Code Example
import * as Notifications from 'expo-notifications';
async function registerForPushNotifications() {
const { status } = await Notifications.requestPermissionsAsync();
if (status !== 'granted') return null;
const tokenData = await Notifications.getExpoPushTokenAsync();
return tokenData.data; // send this to your backend to store
}
// Local notification example (no backend needed)
await Notifications.scheduleNotificationAsync({
content: { title: 'Reminder', body: 'Practice React Native today!' },
trigger: { seconds: 60 },
});Once permission is granted, you get a push token string, and a local notification triggers after 60 seconds.Try it in 5 minutes
Install expo-notifications and schedule a local notification (scheduleNotificationAsync) yourself (on Expo Go).
A quick word of caution
If you request push notification permission the moment the app opens, users tend to deny it more often — requesting it contextually, at the moment the feature is actually used (e.g. the first time the chat feature is used), gets a better accept rate.