1. Get Started
- Go to https://console.firebase.google.com/
- Signin with a Google Account
If you login with a Google Account that is linked to a Google Play Developer account, you can link your Firebase Projects (and apps) more easily to your Android apps in the Google Play Developer Console. However, this is not a requirement to setup your Push Notifications for a Twixl app.
2. Add a Project
- Click on Add Project.
- Choose a Project Name (e.g. the name of your app:
My Magazine). You can also choose an existing Project to setup Firebase for.
- Choose a Project ID or accept the proposed one.
3. Setup your Firebase Project
- Click on the Gear icon next to 'Project Overview'
- Select Project Settings.
- Select the tab Cloud Messaging API.
- Enable 'Firebase Cloud Messaging API'.
- Select 'Manage service accounts'.
- Click on one of the service accounts or create a new one.
- Go to 'Keys', click 'Generate a new private key' and save the private key (a JSON file). This key is the one that needs to be uploaded to the platform.
ABOUT FIREBASE ANDROID AND IOS APPS:
In Firebase, you can setup an Android and/or iOS app. For more details about configuring for iOS, check here.
4. Generate your Google Services JSON file
- In Project Settings, select the General tab.
- Add an
- Fill in the Android package name (a reverse DNS name like com.mycompany.myapp), and optionally specify an App nickname.
- Click Register to continue.
- Download the
google-services.jsonfile and save this file. You'll need it in your build setting on the platform.
5. Upload the JSON Key to the platform
- Go to the detail view of your app on the Twixl platform, then select Notifications from the top menu.
- Upload the JSON Key generated in step 3.
6. Add google-service.json to your build setting
In the build setting for your app on the platform, select the
google-services.json file from step 4 to add it.
7. Build your app
You have now configured push notifications for Android and are ready to create the build of your app, or you can first configure push for iOS as well.
8. Test your push notification
To test push notifications, you first have to register your device as a test device. Once you have registered your device, you can test push notifications for your app. Make sure your device settings and the app settings allow push notifications.