Gluon CloudLink » Google Cloud Messaging

Google Cloud Messaging

To be able to use push notifications in your Gluon Mobile application on android, you need the correct credentials for accessing Google’s GCM services.

Sign in to the Google Developers Console with your Google Account and create a new project, or choose one of your existing projects to enable GCM for that project.

GCM - create or choose an app

Fill in the package name of the android application. The package name should match the name of the package that is configured in Android Manifest of your Gluon Mobile application. Click Choose and configure services to continue.

GCM - set android package name

In here you can configure which Google services should be enabled in the Google Application. Choose the Cloud Messaging service and click the Enable Google Cloud Messaging button that appears at the bottom.

GCM - choose and configure services

A Server API Key and Sender ID will be generated for the Google Application. Note these values down, because you need both to configure your Gluon Mobile application for push notifications. You can safely close the window afterwards.

GCM - cloud messaging credentials

Alternatively, you can register the app with Firebase, where you will get now a longer Server Key (as the GCM server key is marked as legacy).

Firebase - cloud messaging credentials

Gluon Dashboard

Browse to the Gluon Dashboard, select the Push Notifications link and navigate to the Configuration tab. Paste the Server API Key into the textfield in the Android section at the top. Don’t forget to click the Save button to apply your changes.

GCM - enter credentials in Gluon Dashboard

The Sender ID is required in your Gluon Mobile application code when enabling push notifications with an instance of PushClient.