This content has been archived.

Migrating Android custom mobile apps that use push notifications to Firebase Cloud Messaging in Pega 8.1 and earlier

Push notifications in custom mobile apps for Android that are created by using Pega Platform™ required Google Cloud Messaging (GCM) service. However, GCM service has been deprecated and will be removed from use on April 11, 2019. If you use GCM push notifications in an existing Android custom mobile app, you must migrate your GCM project to Firebase Cloud Messaging (FCM) before this date. FCM inherits the GCM infrastructure and adds new features.

Perform the following steps to migrate your Android project to FCM push notifications.

Prerequisites

In Pega Platform 8.1 or earlier versions, install a relevant hotfix to enable FCM support:

  • Pega 7.3.1 - HFix-51029
  • Pega 7.4 - HFix-52727

Importing your GCM project to a Firebase project

To enable FCM push notifications, you must import an existing Android GCM project to a Firebase project. Do the following:

  1. Log in to the Firebase console and add a project.
  2. Select the existing GCM project and add the Firebase project to an Android mobile app.
  3. Enter the mobile app package name and select SHA-1, and then download the generated google-services.json file for an Android mobile app.
  4. Save the generated FCM server key for the Firebase project for reference.
For more information about importing an existing GCM project as a Firebase project, see the first section in Migrate a GCM Client App for Android to Firebase Cloud Messaging.

Updating the Android certificate set

Update the certificate set that is used by an Android custom mobile app so that it includes the information about the FCM server key and google-services.json file for the Firebase project that you created.

  1. Log in to Pega Platform.
  2. In Dev Studio, click the name of an application, and then click Channels and interfaces.
  3. Click a custom mobile app icon.
  4. Click the Build tab.
  5. In the Platforms section, turn on the Android switch.
  6. In the Certificate set section, edit an existing certificate set.
  7. In the Server API Key field, enter the FCM server key that is used to authenticate with FCM services that you obtained from the Firebase console.
  8. Add and upload the Google Services JSON file that you obtained from the Firebase console.
    If the google-services.json file is not added to the branding-assets.zip file, when you build the custom mobile app in Pega Platform the process will fail.
  9. Click Submit.

You can now build your Android custom mobile app in Pega Platform so that the FCM push notifications are enabled.

Adding and uploading the Google Services JSON file

In Pega Platform 8.1 or earlier versions, after you download the google-services.json file from the Firebase project, you must add it to the branding-assets.zip file, which contains custom branding for an Android custom mobile app in Pega Platform.

  1. Obtain the branding assets file for your Android custom mobile app.
  2. Save the google-services.json file in the root directory of the branding-assets.zip file.
  3. Upload the updated branding-assets.zip file to Pega Platform.
Suggest Edit

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.