Login

Learning&Support

Documentation

Android: Setting up Firebase Push Notifications (> 8.0)

Twixl Support Team Updated: - Created :

In this KB-article, we explain the procedure to setup Push Notifications for Android. We cover both the old Google Cloud Messaging (GCM) part, so your existing apps are still compatible, as well as the new Firebase part (for your new apps).

1. Get Started
  1. Go to https://console.firebase.google.com/
  2. Signin with a Google Account.
  3. Go to the Console.

TIP:

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 Publisher issue-based or article-based app.

ABOUT THE OLD GCM CONSOLE (< 04/2018):

The old url https://developers.google.com/mobile/add will automatically redirect to the new Firebase Console. Handy for people that like to manage their bookmarks: you don't need to update your bookmark!

2. Add a Project
  1. Click on Add Project.
  2. Choose a Project Name (e.g. the name of your app: My Magazine). You can also choose an existing Project to setup Firebase for.
  3. Choose a Project ID or accept the proposed one. You cannot change the project ID after you created it.
  4. Choose your Country/region (e.g. Belgium).
  5. Click on Create Project.
  6. Wait for the Project to be created an click on Continue afterwards.
3. Setup your Firebase Project
  1. Click on the Gear icon next to your Project Overview
  2. Select Project Settings.

In the next screen, select Cloud Messaging.

You'll get 3 important values:

  1. Server Key: needs to be entered on the Twixl Distribution Platform if you want to publish a completely new Twixl App in the Google Play Store, built with Twixl Publisher 8.0+
  2. Legacy Server Key: needs to be entered on the Twixl Distribution Platform if you have an existing Twixl App in the Google Play Store! This way, you can continue to send Push Notifications to readers that didn't update their app to Twixl Publisher 8.0+ build yet.
  3. Sender ID: needs to be entered in the build settings in the macOS app

ABOUT FIREBASE ANDROID AND IOS APPS:

In Firebase, you can setup an Android and/or iOS app. This is not necessary for Twixl Publisher issue-based or article-based applications! The only requirement is the setup of a Project (as explained above).

4. Generate your Android JSON file
  1. Go to your Project Overview.
  2. Click on the + Add App icon.
  3. Select the Android platform.
  4. Fill in the Android package name
  5. and optionally, specify an App nickname.
  6. Click Register app to continue.
  7. Download the google-services.json file and save this file. You'll need it in your Build Setting.
5. Enter API Server Key on Twixl Distribution Platform
8. Enter API key on Twixl Distribution Platform
  1. Go to the detail view of your app on the Twixl Distribution Platform, then select Notifications from the top menu.
  2. Now enter the API Server Key in the correct field.

TIP:

Enter the right API Server Key (also see 2. Setup your Firebase Project):

  • A Legacy Key for an update of an existing app.
  • A Server Key for a brand new Twixl Publisher 8.0+ app.
6. Attach Android google-service.json in your build setting

In the build settings of your app in the macOS builder app (under "Article-based app" or under "App Store Kiosk - Basic Settings"), drag the google-services.json file from Step 4 in the field Android google-services.json

Build Setting
7. Build your app

You have now configured push notifications for Android in your app and are ready to create the build.

Was this article helpful?

0 out of 0 found this helpful