As of release 19.0, new Twixl apps can only use Google Firebase for sending out push notifications.
We chose to adopt Firebase on both iOS and Android because of the flexibility it offers for more advanced users that want to build marketing campaigns across platforms in a unified way.
Watch a video with step by step instructions
1. Get Started
- Go to https://console.firebase.google.com/
- Signin with a Google Account, preferably but not necessarily the same one you use for the Google Play Developer account.
2. Add a Project
- Click on Add Project. (You can also choose an existing project if you already created one before.)
- Choose a Project Name.
- Choose a Project ID or accept the proposed one.
3. Add an Android app to your project
- Click on the Gear icon next to 'Project Overview'
- In Project Settings, select the General tab.
- Add an
Android
app. - 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.json
file and save it. You can skip the subsequent steps.
4. 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' if it's not enabled yet (for new projects it will be enabled by default).
- Select 'Manage service accounts'.
- Click on the service account
firebaseadminsdk-…
- 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 in the Push Notifications section on the platform.
USING FIREBASE FOR BOTH ANDROID AND IOS APPS:
In Firebase, you can setup an Android and/or iOS app. For more details about configuring for iOS, check here.
5. Upload the JSON Key to the platform
- Go to the detail view of your app on the Twixl platform, then select Push Notifications from the side menu (under 'Advanced').
- Upload the Service Account Private Key (JSON) generated in step 3.
6. Add google-services.json to your build setting
In the build setting for your app on the platform, select the google-services.json
file from step 4 and upload it there.
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.