HowTo: Configuring Push Notifications in Android Applications

Official Content
This documentation is valid for:

Warning: As from GCM was deprecated (April 10, 2018) and removed (April 11, 2019) by Google, Notification Provider is the only method available to integrate Push Notifications in a GeneXus-generated Android application..

This is a step by step guide to setup push notifications for an Android Application. If you need general information on how to use push notifications please see Push Notifications in Smart Devices Application.

Requirements

Using a Google account you need to access the Firebase Console, set up a new project, and get a Sender ID, and a Server Key.

ScreenShot2019-03-07at3_28_45PM_png

Sender configuration

Using Push Notifications in a GeneXus-generated application is really simple, and is done by setting to True the Enable Notifications property in the Main object properties group. When doing this, a new set of properties is available (under the header Notifications):

AndroidNotif

Here you need to set the credentials previously configured for the notifications service, Android Sender ID and Android Server API Key (set with the Server Key obtained before).

Intermediate Step

From now on, every time we execute a GeneXus application which has Push Notifications enabled in a device, the Devices Registration Service is executed in order to register and store the device information to be used in the future to send messages (Push Notifications) to that device. 

How to send notifications? 

Notifications are sent as shown in this Sender example: Notification Provider APIHowTo: Sending Notifications to Smart Devices Applications].

Application execution

And that’s it. The messages sent will be shown as notifications in the Android device:

AndroidNotifExample



Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.