---
title: "Android push through Expo"
description: "Add push and notifications with bun exact.mjs add push and bun exact.mjs add notifications."
modificationDate: "2026-11-17"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Android push through Expo

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/recipes/push: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

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](https://docs.expo.dev/push-notifications/fcm-credentials/)
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.

```prompt Send push notifications to my Android app through Expo
Make the Exact app in this folder receive Android push notifications that my backend sends through Expo. Use https://github.com/expo/exact/blob/main/docs/recipes/push.md as the source for each step. The Exact checkout has the same page at docs/recipes/push.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. Ask me for each of these that I did not give, before you write code: the Firebase client's `google-services.json`, whose package name matches the Android app id; the id of the EAS project that has the same Firebase project's FCM v1 credentials (https://docs.expo.dev/push-notifications/fcm-credentials/); my backend's origin; and the channel's name, importance and sound.
3. Install the packages: `bun exact.mjs add push` and `bun exact.mjs add notifications`. Put `google-services.json` beside app.json.
4. In app.json, add `extra.eas.projectId` and the channel under `host.android.notificationChannels`. The channel's `name` is a key in the app's string tables: add it to each locale. The sound is a `.wav`, `.ogg` or `.mp3` asset. A changed importance needs a new channel id.
5. Merge the complete app example into the app (`bun exact.mjs docs android expo push example`): subscribe from a press, exchange each live FCM token with Expo, save the Expo token on my backend, and handle a data message by posting on the channel. Grant `net.fetch https://exp.host` and the backend's origin. Await the handler's work so the wake owns it.
6. Put no server key in the app: the FCM credentials stay on Expo. If my backend is in this folder, make it send as the recipe's Bun example does; if not, give me that example. Keep the title and body inside `data`: a top-level `title` or `body` does not raise `push`. A ticket does not prove delivery: check `push/getReceipts` too.
7. Add a test in app.test.contract for what the app shows before a person subscribes.
8. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 9) and report it; do not keep trying.
9. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
10. Tell me what changed, what the tests and checks reported, and what I must still do on a phone. The checks prove no delivery: the phone checklist does (`packages/push/test/checklist.md` in the Exact checkout, "Android through Expo"). Never force-stop the app there.
```

```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](https://exact.expo.dev/reference/developer/generate-typescript-data-source-types.md#android-expo-push-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](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/packages/push/test/checklist.md#android-through-expo)
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.
