This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.

Android push through Expo

Add push and notifications with bun exact.mjs add push and bun exact.mjs add notifications.
Add push and notifications with bun exact.mjs add push and bun exact.mjs add notifications. Put the Firebase client's google-services.json beside app.json; its package name must match the Android app id. Configure the same Firebase project's FCM v1 credentials in the EAS project, as Expo's setup guide describes. Add these fields to app.json. The channel's name is a key in the app's string tables; put "channel.urgencies": "Urgencies" in each locale. The sound is a .wav, .ogg or .mp3 asset. A changed importance needs a new channel id.
Send push notifications to my Android app through Expo
Paste this into Claude, Cursor, Codex, or another agent.
json
{
"extra": { "eas": { "projectId": "your-EAS-project-UUID" } },
"host": { "android": { "notificationChannels": [
{ "id": "urgencies", "name": "channel.urgencies", "importance": "high",
"sound": "assets/urgencynotification.wav" }
] } }
}
The complete app example subscribes from a press, exchanges each live FCM token with Expo, and handles a data message by posting on urgencies. Its imported app.json names the EAS project; the subscription names the installed package. Grant net.fetch https://exp.host and the backend's origin. Await the handler's work so the wake owns it.
The backend sends the saved Expo token to Expo's send endpoint. The FCM credentials stay on Expo; no server key belongs in the app. This Bun example sends one data-only panic alert and checks Expo's ticket. Keep the title and body inside data so the app's handler runs:
ts
const response = await fetch('https://exp.host/--/api/v2/push/send', {
method: 'POST', headers: { 'content-type': 'application/json' },
body: JSON.stringify({ to: process.env.EXPO_PUSH_TOKEN,
priority: 'high',
data: { title: 'Urgency: Police', body: 'House 12',
id: 'urgency-42', navigate: '/urgencies' } }),
});
if (!response.ok) throw new Error(`Expo HTTP ${response.status}`);
const ticket = await response.json();
console.log(ticket);
if (ticket.data?.status !== 'ok') throw new Error('Expo refused the push');
Check push/getReceipts too: a ticket does not prove delivery. The channel supplies the app sound on Android. high is Android's highest used importance; IMPORTANCE_MAX is documented as unused.
A data-only message raises push in the live or headless session. Boot, queueing and handler work share ten seconds. It cannot ask permission or open UI. Top-level title or body makes a notification message: Firebase shows it in the background and Exact shows it in front, without raising push.
With the app's Firebase project, follow the phone checklist on the POCO X6 Pro in front, in the background and after am kill. Do not use force-stop: Android stops delivery to a force-stopped app until it is opened again. HyperOS battery and autostart settings can further restrict delivery. Keep the urgency on the server so the app can reconcile on return.
Is this helpful
Last updated November 17, 2026
Exact Docs