This guide explains how to configure push notifications in an Expo app using SDK 54 or later, based on the official Expo documentation:
- https://docs.expo.dev/push-notifications/overview/
- https://docs.expo.dev/push-notifications/push-notifications-setup/
- https://docs.expo.dev/push-notifications/fcm-credentials/
- Development builds: https://docs.expo.dev/develop/development-builds/expo-go-to-dev-build/
It also includes additional system setup requirements such as installing and configuring a Java JDK, required for Android native builds.
Expo push notifications allow your app to receive messages even when it is not running. Beginning with Expo SDK 54, push notifications no longer work inside Expo Go. To test them, you must use a Development Build of your app.
A development build is a custom native binary that contains the native modules your app uses. Expo Go cannot include every module, so it removes push notification support.
Before configuring push notifications, ensure the following dependencies are installed:
Android Gradle tooling requires a full JDK installation.
Install Java 17 from Oracle or Temurin, then configure:
JAVA_HOME=C:\Program Files\Java\jdk-17
PATH=%JAVA_HOME%\bin
Verify installation:
java -version
javac -version
Both should report version 17.
npm install -g expo-cli
Expo uses the Android SDK and emulator tooling from Android Studio.
npm install -g eas-cli
Required to install the APK on your device or emulator.
Expo Go does not include the native module expo-notifications. When the app tries to use push notifications, Expo Go cannot load the native code.
To test push notifications, you must:
- Configure Firebase and push notifications
- Create a development build
- Install it on your device or emulator
- Run the app with full native permissions
Official reference: https://docs.expo.dev/develop/development-builds/expo-go-to-dev-build/
npx expo install expo-notifications
IMPORTANT: On my case, this file doesnt exist on my project, and if its the same case for you, just ignore this step.
Expo automatically configures AndroidManifest.xml when using managed workflow.
For bare workflow, ensure you have:
android.permission.INTERNET
android.permission.VIBRATE
android.permission.POST_NOTIFICATIONS
This section covers the setup required to support push notifications using Firebase Cloud Messaging (FCM) with Expo SDK 54. It integrates all steps from the official Expo guides:
- https://docs.expo.dev/push-notifications/push-notifications-setup/
- https://docs.expo.dev/push-notifications/fcm-credentials/
To enable notifications on Android, two Firebase components are required:
- google-services.json — Configures Firebase inside the Android native build.
- Service Account Key JSON — Allows Expo/EAS to send push notifications using FCM v1.
Both must be configured correctly to avoid runtime errors such as:
default firebaseApp is not initialized
Make sure to call FirebaseApp.initialize(Context)
Firebase requires this file inside the Android native project to initialize FCM.
In Firebase Console:
- Go to Project settings.
- Under Your apps, select the Android app with the correct package name.
- Click Download google-services.json.
Note: This is not the Admin SDK key. The correct file is always named exactly:
google-services.json
Place the file at the root of your Expo project:
project-root/
google-services.json
app.json
package.json
"android": {
"package": "com.example.pushapp",
"googleServicesFile": "./google-services.json",
"useNextNotificationsApi": true
}Expo will automatically copy this file into the correct native location during EAS builds.
Test-Path ./google-services.jsonShould return True.
It is safe to commit google-services.json to version control since it contains no secrets.
This key enables push delivery through Expo's servers using FCM v1.
In Firebase Console:
- Go to Project settings → Service accounts.
- Click Generate new private key.
- Download the JSON (filename contains a random suffix).
This is the sensitive key used by Expo/EAS.
At Expo Dashboard:
https://expo.dev/accounts/<account>/projects/<project>/credentials
Upload the Service Account Key JSON under Android → Push Notifications (FCM).
Expo will now be able to deliver notifications via FCM v1.
import * as Notifications from 'expo-notifications';
import { Platform } from 'react-native';
export async function registerForPushNotificationsAsync() {
const { status: existingStatus } = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== 'granted') {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
}
if (finalStatus !== 'granted') {
alert('Permission is required to receive notifications');
return null;
}
const token = await Notifications.getExpoPushTokenAsync();
console.log('Expo Push Token:', token.data);
return token.data;
}Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: false,
}),
});Call the registration function in your root component:
useEffect(() => {
registerForPushNotificationsAsync();
}, []);Run the following command to create a development build:
eas build --profile development --platform android
When Expo asks:
? Generate a new Android Keystore? » (Y/n)
Select: Y (recommended for development builds).
EAS will automatically:
- Generate a new Android keystore
- Store it securely on Expo servers
- Use it to sign your development build
Note: This keystore does not affect production signing. It's safe, automatic, and ideal for testing features such as push notifications.
After running the build command, your build will be processed on Expo's servers.
Track your build progress:
- Go to your Expo Dashboard: https://expo.dev/
- Navigate to your project
- Go to Builds section
- You will see your build status in real-time (Queued → Building → Finished)
The dashboard shows:
- Build status and progress percentage
- Build logs for debugging
- Estimated time remaining
Once the build finishes successfully:
-
Download the APK from the Expo Dashboard
- Click on the completed build
- Download the APK file to your computer
-
Install on your device or emulator:
adb install path\to\app-development.apkOr simply drag and drop the APK file onto your emulator.
Start the dev client to connect your app to your development server:
npx expo start --dev-client
The app will start on your device or emulator with full native support and hot reload enabled.
-
Copy the Expo Push Token
- The token will be printed in the console when the app starts
- It looks like:
ExponentPushToken[...]
-
Send a test notification
Option A: Using the Expo Web Tool
- Visit: https://expo.dev/notifications
- Paste your token
- Add a title and message
- Click "Send Notification"
Option B: Using the Expo CLI
expo push:send --to <your-token> --title "Hello!" --body "This is a test notification." -
Verify the notification arrives
- If configured correctly, the notification should appear on your device
- The app will trigger the notification handler you set up
-
Test Hot Reload
- While the dev client is running, make changes to your code
- Press
rin the terminal to reload the app - Your changes appear instantly without reinstalling the APK
For development builds, the recommended choice is Y when generating a new keystore.
Only choose n if you already have your own .jks file and want to upload it manually — typically for production builds.
When releasing your app:
- Android uses Firebase Cloud Messaging (FCM)
- iOS requires an Apple Developer key
- EAS will guide you through this setup
Production builds must be generated with:
eas build --platform android
- SDK 54 requires development builds to use push notifications
- Install and configure Java JDK 17 for Android build tools
- Use expo-notifications and request permissions from the user
- Configure Firebase and google-services.json before building
- Use the Expo Dashboard to monitor build progress and download APK
- Install the APK and run with
npx expo start --dev-clientfor hot reload support - Test notifications with a dev build, not Expo Go
Your app is now ready to receive push notifications!
- Expo Push Notifications Documentation: https://docs.expo.dev/push-notifications/overview/
- Push Notifications Setup: https://docs.expo.dev/push-notifications/push-notifications-setup/
- FCM Credentials: https://docs.expo.dev/push-notifications/fcm-credentials/
- Development Builds: https://docs.expo.dev/develop/development-builds/
- Expo Dashboard: https://expo.dev/