For a React Native app developer, Expo Notifications offer incredible simplicity, until you get to Android. While device tokens make sending push notifications easy, Android introduces its own checklist: permission requests, Firebase integration, and channel configuration. Ignoring these details can cause notifications to vanish into thin air, leaving your mobile app development feeling incomplete.
Drag
After the iOS and Android dev builds are all set, install Expo Notifications to ask the user for permissions and require the device’s token to later send push notifications to.
Drag
Use the following to install Expo Notifications. The example in the documentation uses some other packages, too, so it’s worth a read.
Drag
Generate new, non-emulator dev builds after installing the packages.
Drag
npx expo install expo-notifications
Bash
Drag
import * as Notifications from "expo-notifications";
JavaScript (React)
Drag
Next, run the EAS CLI to make a new build. It will prompt to set up iOS push notifications. You just log in with app store credentials. Easy!
Drag
Expo Notifications uses Firebase Cloud Messaging (FCM) to send push notifications to Android devices. This requires a Google service account and the corresponding credentials.
Drag
It’s possible to get the FCM V1 service account key from Firebase. Create a Firebase project and create an Android App from the project dashboard. Click “Add app” and select the Android Logo. Enter the package name, which is usually in the app.json file. Run through the rest of the prompts and be sure to download the google-services.json file, add it to the root of the project, and commit it to version control. It’s needed later. Now download the private key which will be uploaded to Expo. Just go the settings for the new Android app in Firebase. It should be a cog icon. Click “Service accounts” and the button that says, “Generate new private key.” This should download your key automatically as a JSON file.
Drag
Now you need to upload your private key JSON file to Expo. Login to your Expo dashboard and select your project. Click “Credentials”from the left then select your Android application identifier. You can upload the JSON file you download under the “FCM V1 service account key” section.
Drag
Lastly we’ll tell Expo where to fine that google-services.json file. Head over to your app.json file and add the following under the Android section. It should look something like this:
Drag
{
"android": {
"googleServicesFile": "./google-services.json"
}
}
JSON
Drag
You may need to add FCM permissions to your Firebase service account from the IAM section in Google Cloud. I think Firebase does this for you, though.
Drag
For a React Native app developer, getting Expo Notifications running smoothly on Android might feel like a detour, but it’s really the path to reliability. These extra setup steps with Firebase, service accounts, and permissions aren’t just technical hurdles; they’re what transform good mobile app development into trusted, production-ready software.
Drag
Once configured, your cross-platform app development gains the consistency users expect from top-tier apps. Every ping, alert, and message lands where it should, creating an experience that feels thoughtful and complete. That’s the real payoff of strong React Native development services: fewer “why didn’t I get that notification?” moments, and more confident connections between your app and its audience.
Drag
I see every small Android adjustment as an opportunity to elevate your product. With the right setup, your custom app development becomes future-proof; ready for scaling, launching, and thriving across every platform.
Leave a Reply