I have followed the steps to add the notifications using gcm on my app and Im receiving the notifications on the console, but, the messages aren’t showed on the screen, so Im thinking I stillĀ need something else, Im thinking I need a permission on the android manifest?
GoogleCloudMessaging {
id: gcm
enabled: true
topics: ["topic-1"]
onNotificationReceived: {
console.debug("Received notification payload is",
JSON.stringify(data))
}
onRegistrationTokenReceived: {
var oldToken = app.settings.getValue( properties.mGCMToken )
if ( oldToken !== token){
// app.settings.setValue( properties.mGCMToken, token )
console.debug("GCM: new token set ")
console.debug(token)
app.settings.setValue( properties.mGCMTokenNew, token )
}
}
}
console:
Received notification payload is {“alert”:{“body”:”great match!”,”title”:”Portugal vs. Denmark”},”message”:”Sample message for Android endpoints”}