Setting Up Android Push Notifications
Last updated
Last updated
This guide provides step-by-step instructions to set up Android Push Notifications using Firebase Cloud Messaging (FCM). By following these steps, users can enable push notifications in their Android app and integrate FCM for seamless message delivery.
Before proceeding, ensure you have:
An active Google account.
Android Studio installed on your system.
A registered Android app in Firebase.
Click Add Project.
Enter your project name and click Continue.
Click Create Project and wait for the setup to complete.
In Firebase Console, open your project.
Click the Settings (⚙️) > Project Settings.
Under the General tab, scroll to Your Apps.
Click Add App > Android.
Enter your Android package name (from AndroidManifest.xml).
(Optional) Add an App Nickname.
Click Register App.
After registering the app, click Download google-services.json.
Move this file to your Android project:
Place it in the app/ directory.
Open your project’s build.gradle files and ensure Firebase dependencies are added:
Project-level build.gradle (android/build.gradle):
dependencies {
App-level build.gradle (android/app/build.gradle):
Open app/build.gradle.
Add the following dependency:
dependencies {
Sync your Gradle files.
Add the following permissions inside the <manifest> tag:
Create a new Java/Kotlin class MyFirebaseMessagingService.
Extend FirebaseMessagingService and override onMessageReceived():
Register this service in AndroidManifest.xml:
In MyFirebaseMessagingService, add the following:
Run your app and check Logcat for the FCM token.
Copy the token for testing.
Go to Firebase Console > Cloud Messaging.
Click Send your first message.
Enter a notification title and message.
Select Send to a test device.
Paste the copied FCM token.
Click Send Message and check if the notification appears on the device.
To send notifications from Organon, users must upload their google-services.json file.
Open Organon and go to Push Notification Settings.
Navigate to the Android tab.
Click Edit and upload the google-services.json file from Firebase.
Save the configuration.
Enable Android Push Configuration.
Send a test notification to confirm setup.
Once testing is successful:
Use Organon’s campaign feature to send push notifications.
Monitor delivery rates and engagement using Organon’s analytics dashboard.
Optimize message content for better user interaction.
Ensure google-services.json is correctly placed in Organon’s settings.
Verify the Firebase project is set to allow push notifications.
Check Organon’s notification logs for errors.
Ensure the device has internet connectivity.
Following these steps will enable push notifications via Firebase Cloud Messaging and allow sending notifications directly from Organon.
A Firebase project set up in the.
Go to.