How to configure Google Cloud Messaging Service

by Lucio Bordonaro
16,652 views Published on May 21, 2015
Applies to: 8.0 or higher
Table of contents

Introduction

WebRatio Mobile Platform allows you to send push notifications from a DataService Project. You need to add and configure a Notification Provider to enable the project for push notifications. The Notification Provider requires a specific configuration for each platform. For the Android platform you need to have an API Key.

This article is a step-by-step tutorial to guide you in the configuration of Android Push Notification for a DataService Project.

You need to read, understand and accomplish each step listed here to be able to send Android Push Notifications from a DataService Project.

Set everything up and run it, you will need a Google API Project that provides both the Sender ID and the required API Key.

All this information is strictly related to the environment (development or production) you are setting up for the Mobile Application. This article shows the procedure for a development-environment setup.  Of course you can apply the same procedure for the production environment.

NOTE. The Google API Project used for development environments can later be used for product environments.

Prerequisites

The procedure shown in the article requires you to have:

  • An active Internet connection to build the project.
  • A Google account.

Google API Project

Let's start by creating a new Google API Project.

Open the Google Developers Console available here.

  1. If you already have projects, create a new one or create your first Google API Project.

 

  1. Provide a name for your project. Choose the related organization (if it exists) and then press CREATE.

 

  1. As soon as the project is created, a new page appears showing the library of the Google APIs you can enable.

 

  1. In the Browse APIs field, search for Google Cloud Messaging (GCM). You will immediately get the desired APIs. In the description you can see that Firebase Cloud Messaging (FCM) is the new version of GCM. If you want to see the related documentation go here.

 

  1. Open the Firebase Console available here.

 

  1. You can create a new one or import a Google Project. In this case we import the project created previously. Choose the project you want to import and press on the ADD FIREBASE button.

 

  1. As soon as the project is imported, a new page appears showing the dasboard.

 

  1. Press on the Settings button next to the Overview option in the left menu and choose the Project settings option.

 

  1. A new page appears showing the general settings of the project. In the top menu, click on the CLOUD MESSAGING item. Information about API Key is available to be used for your Server.

 

Result

Now that you now have both a Google API Project and the Public API Access, you can set the API Key of the DataService Project. The Sender ID can be later used for the Notification Sender ID property of the build dialog in order to build a client app using push notifications coming through this Google API Project.