I have an issue with the push notifications ANE.
I send some test notifications with the nice php you have in the tutorial. When the app is inactive, they show up correctly in Android's notifications area (slide down from the top).
But whatever notification I tap, my app always shows the most recent instead of the one selected.
Hi guys
I have an issue with the push notifications ANE. I send some test notifications with the nice php you have in the tutorial. When the app is inactive, they show up correctly in Android's notifications area (slide down from the top). But whatever notification I tap, my app always shows the most recent instead of the one selected.
I use the following code:
function initNotifications() { PushNotifications.init("..."); if (PushNotifications.isSupported==true) { PushNotifications.service.addEventListener( PushNotificationEvent.REGISTER_SUCCESS, pn_registerSuccessHandler ); PushNotifications.service.addEventListener( PushNotificationEvent.UNREGISTERED, pn_unregisterSuccessHandler ); PushNotifications.service.addEventListener( PushNotificationEvent.NOTIFICATION, pn_notificationHandler ); PushNotifications.service.addEventListener( PushNotificationEvent.ERROR, pn_errorHandler ); PushNotifications.service.register("..."); } }
function pn_notificationHandler( event:PushNotificationEvent ):void { var data:Object = JSON.parse(event.data); // show data... }