Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Unable to send Push Notification on custom Android application

SA-93502

Summary

Unable to trigger Push Notification (PN) on a custom Android application. The Status displays as Not Registered in the Push console.


Error Messages


Can't send push notification to GCM server. The reason is: 'Could not post JSON requests to GCM after 4 attempts' 
com.pega.pegarules.priv.mobile.pushnotification.PushNotificationException: Can't send push notification to GCM server. The reason is: 'Could not post JSON requests to GCM after 4 attempts'
at com.pega.pegarules.integration.mobile.internal.pushnotifications.sender.GcmSender.send(GcmSender.java:64) 
at com.pega.pegarules.integration.mobile.internal.pushnotifications.AndroidPushNotifier.sendToDevice(AndroidPushNotifier.java:69) 
at com.pega.pegarules.integration.mobile.internal.pushnotifications.BasePushNotifier.sendToDevice(BasePushNotifier.java:281) 
at com.pega.pegarules.integration.mobile.internal.pushnotifications.BasePushNotifier.sendToDeviceGroupped(BasePushNotifier.java:275) 
at com.pega.pegarules.integration.mobile.internal.pushnotifications.BasePushNotifier.sendToApplication(BasePushNotifier.java:257) 
at com.pega.pegarules.integration.mobile.internal.pushnotifications.AggregatingPushNotifier$3.visit(AggregatingPushNotifier.java:107) 
at com.pega.pegarules.integration.mobile.internal.pushnotifications.AggregatingPushNotifier.sendMessage(AggregatingPushNotifier.java:127) 
at com.pega.pegarules.integration.mobile.internal.pushnotifications.AggregatingPushNotifier.sendToApplication(AggregatingPushNotifier.java:103)


Steps to Reproduce

  1. Set up a Pega 7.2.2 instance
  2. Build HC7 for Android with the Push Notification support
  3. Run the application
  4. Log in to Designer Studio
  5. Send Push Notification


Root Cause



Google Cloud Messaging (GCM) service is deprecated and removed from use on 11th April, 2019. Migration from GCM to Firebase Cloud Messaging (FCM) is performed before 11th April, 2019.

Resolution



Apply HFix-57816.

 

Published January 3, 2020 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us