Push Notifications
a0 provides built-in push notification delivery through FCM (Android) and APNs (iOS). Your Convex backend sends notifications via a0’s API — no third-party push services needed.
Push notifications do NOT work in Expo Go or the a0 preview app.
Test with a custom APK (Android) or TestFlight build (iOS).
How it works
- Your app collects device push tokens using
expo-notifications
- Your Convex backend calls
internal.notifications.sendNotification
- a0 detects the platform from the token and delivers via FCM or APNs
The convex/notifications.ts file is automatically included in your project. It’s an internal action — only your server-side Convex functions can call it, not the client.
Getting a device push token
Use getDevicePushTokenAsync() from expo-notifications — not getExpoPushTokenAsync():
Sending notifications
Call sendNotification from your Convex backend using internal (not api):
Android Setup
Follow the Android FCM Setup guide to configure Firebase Cloud Messaging credentials:
- Create a Firebase project and add your Android app
- Download
google-services.json
- Create a Firebase service account key (for FCM v1 delivery)
- Upload both in Project Settings → Build Settings → Android Credentials
- Create a new APK build
iOS Setup
iOS push notifications are configured per Apple Developer team:
- Connect your Apple Developer account via the Publish → App Store flow
- Set up APNs credentials (automatic or manual) from the team management dialog
- Create a new App Store / TestFlight build
The aps-environment entitlement is included automatically in all builds.
Handling notifications in your app
Troubleshooting