For Android Apps, not websites
This guide is for developers implementing OneSignal in an Android application for distribution on the Google Play App Store. This guide should not be used for Web Push.
A Google Firebase Server Key is required for all Android mobile apps and Chrome apps & extensions. It is optional for Amazon apps.
A Firebase Server Key and Firebase Sender ID are required in order to send push notifications to Android mobile app devices.
The goal of this section is to provision your Firebase Server Key and Firebase Sender ID for use in OneSignal.
- An Android mobile app, Chrome app or extension, or an Amazon app.
- A Google account
- A OneSignal Account, if you do not already have one.
If you already have an FCM project you would like to use with OneSignal, you will need to retrieve your Sender ID and Firebase Cloud Messaging token. You may then skip to Step 2.
Visit the Firebase Console and sign in with your Google account.
Click CREATE NEW PROJECT or select an existing one below.
Enter a project name and press CREATE PROJECT.
Click the gear icon in the top left and select Project settings.
Select the CLOUD MESSAGING tab.
Save the two values listed under Server key and Sender ID.
In the OneSignal dashboard, select your app from the All Apps page, then go to Settings. Under Native App Platforms, click Google Android.
Paste your Firebase Server Key and Firebase Sender ID into the fields and click Save.
Done! You now have a key to send push notifications from your app. 🥳
If you have not already done so, proceed to install the OneSignal SDK in your app.
Updated 3 months ago