Migrating Android mobile apps that use push notifications to Firebase Cloud Messaging
Push notifications in 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 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.
Importing your GCM project to a Firebase project
To enable Firebase Cloud Messaging (FCM) push notifications, you must import an existing Android GCM project to a Firebase Cloud Messaging project. Do the following:
- Log in to the Firebase console and add a project.
- Select the existing GCM project and add the Firebase project to an Android mobile app.
- Enter the mobile app package name and select SHA-1, and then download the generated google-services.json file for an Android mobile app.
- Save the generated FCM server key for the Firebase project for reference.
Updating the Android certificate set
Update the certificate set that is used by an Android 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.
- Log in to Pega Platform.
- In Dev Studio, click the name of an application, and then click Channels and interfaces.
- Click a mobile app icon.
- Click the Build tab.
- In the Platforms section, turn on the Android switch.
- In the Certificate set section, edit an existing certificate set.
- In the FCM Server Key field, enter the key that is used to authenticate with FCM services that you obtained from the Firebase console.
- Update the Google Services JSON file that you obtained from the Firebase console:
- If you are using Pega Platform 8.1 or earlier, add and upload the Google Services JSON file.
- If you are using Pega Platform 8.2 or later, in the Google Services JSON section, click New and select the google-services.json file you obtained from the Firebase console.
- Click .
You can now build your Android mobile app in Pega Platform so that the FCM push notifications are enabled.
Adding and uploading the Google Services JSON file (Pega Platform 8.1 or earlier)
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 mobile app in Pega Platform.
- Obtain the branding assets file for your Android mobile app.
- Save the google-services.json file in the root directory of the branding-assets.zip file.
- Upload the updated branding-assets.zip file to Pega Platform.