Can't send push notification to valid GCM token containing ':'
Pega MKT v7.13 doesn't support GCM (Google Cloud messaging) tokens containing the ':' character in valid GCM tokens. User is blocked with the error "Unexpected character in Android push token; please review for accuracy" and Push Notification can't be sent.
This is blocker for the project where Push Notifications are one of 2 main communication channels thus this has to be fixed and provided as a patch.
-doc with Screenshot
Unexpected character in Android push token; please review for accuracy
Steps to Reproduce
Configure mobile application through Configuration -> Settings -> Channels -> Push Notification and add Android variant API Key.
Try to send test Push Notification to the following valid GCM token: <TOKEN KEY OBFUSCATED> using Test option.
Both token and Google API key are customer specific and cannot be detailed here.
A defect in Pegasystems’ code or rules. Google has changed the range of acceptable characters used for GCM tokens. Pega marketing GCM token validation requires amendment to either include the new character, or not validate the token at all.
Perform the following local-change:
In private edit update of the When condition in PushNotificationForToken activity step 7 to include the ':' in the reqular expression @(Pega-RulesEngine:String).pxContainsViaRegex(Param.PushToken, "[a-zA-Z0-9_\\-:]*", false).
I believe there is no specification of allowed characters so in the future, Google can generate token that will contain additional characters that are not included in the regular expression so the best solution would be to remove validation at all. This will be done in the next release of Pega Marketing.
0% found this useful