>> The example code includes “custom” data in the push. Does this mean that Corona now also supports this, for both iPhone and Corona? If so, what is the Lua code to fetch the custom data?
“custom” data is definitely supported on Android. If you view the Android log, notice that we print all of the custom data’s content to the log. You can access the custom data via “event.custom” in the notification event provided by its onNotification Lua listener or via the app’s launch arguments. Also note that if you do not provide any custom data, then “event.custom” will be an empty table.
In my opinion, “custom” data is absolutely necessary for push notifications because it is your only means of identifying what the notification is for. Especially if you localize your alert messages.
>> If you get a push INSIDE the app, only iPhone get onNotification(event) with event.type = “remote”, while Android gets nothing.
Yes, this is a known behavioral inconsistency between iOS and Android. Corona does correctly receive the push notification on Android while your app is in the foreground, but it goes straight to the status bar and does not call the notification Lua listener. The notification Lua listener is only called on Android when the end-user taps on the notification on the status bar.
I’ll look into making Android match the iOS behavior this week.
[import]uid: 32256 topic_id: 31525 reply_id: 136390[/import]