Push Notifications on Android Missing Sent Text Data

I’m using the REST API of Backendless to send push notifications from my Corona game. I’ve been successful in sending push notifications to both iOS and Android devices. On iOS the push notifications look good, but on Android. the message, as it appears in the system tray that you pull down, is missing all the text sent. The message only has test that says the app’s name and the name is shown twice for some reason.

The JSON that I send to Backendless looks like this:

{

    “message”: “test message”,

    “headers”: {

        “ios-alert”: “test ios alert”,

        “ios-sound”: “default”,

        “android-content-title”: “test content title”,

        “android-content-text”: “test content text”,

        “android-ticker-text”: “test ticker text”,

        “gameId”: “test game id”

    }

}

Now, no other Backendless developers seem to have the same issue as me, so is it possible the this is a Corona issue? Why would Android not show any text for, “message”, “android-content-title”, “android-content-text”, or “android-ticker-text” on the notification? Does Corona need or use different names?

Try using the ‘alert’ instead of ‘message’ key.

A sample POST to FCM :

$data = array( 'alert' =\> 'Your push notification message', 'data' =\> 'this is an array with data that you want to send together with this. Note there is a max size', ); $post = array( 'registration\_ids' =\> 'an array of google-fcm tokens', 'data' =\> $data, 'time\_to\_live' =\> 'in seconds, see fcm document', ); // Add your api-key into the 'Authorization' header. Remember to json-encode the array before sending to https://fcm.googleapis.com/fcm/send