Scheduling Local Notifications
Install expo-notifications, request permission, schedule a local notification to fire after a delay, and handle the notification tap to navigate to a specific screen.
What Are Local Notifications?
Local notifications are alerts that your app schedules and delivers entirely on-device, without a server. Unlike push notifications, they do not require an internet connection or a backend service. They are ideal for reminders, daily habit prompts, timer alerts, and in-app alerts that trigger after a specific time or based on a recurring schedule.
Installing expo-notifications
Install expo-notifications using the Expo install command so the SDK-compatible version is selected. In managed Expo projects native linking is automatic. Also add the notification configuration block to app.json to set the Android notification icon and color used by the OS.
npx expo install expo-notifications
// app.json:
{
"expo": {
"notification": {
"icon": "./assets/notification-icon.png",
"color": "#6200ee",
"androidMode": "default"
}
}
}All lessons in this course
- Camera Access with expo-camera
- Reading GPS Location with expo-location
- Scheduling Local Notifications
- Handling Permissions Gracefully