Distriqt push notification handle on start app from notification centre

I've just bought Distriqt ANE pack and can't get Push Notification worked for some case. When application isn't started and I receive PN it shows in notification area, but when I try to open app from notification centre ( clicking by notification ) I can't get access to PN which opened application.

I've read documentation and asked Distriqt support but with no luck. In docs we have:

Not running: A notification is displayed in the notification area. When clicked the application is started. When you call register() you'll immediately receive the notification event.

Support team answered:

You need to make sure you add the listener for notifications before you call register. You should receive the notification immediately when you call register if the application was started from the notification center

My code:

PushNotifications.init( PN_DEV_KEY ); //it doesnt init for 2nd time!
if(PushNotifications.isSupported) {
PushNotifications.service.addEventListener( PushNotificationEvent.REGISTERING, onPnRegistering );
PushNotifications.service.addEventListener( PushNotificationEvent.REGISTER_SUCCESS, pnRegisterResult );
PushNotifications.service.addEventListener( PushNotificationEvent.UNREGISTERED, pn_unregisterSuccessHandler );
PushNotifications.service.addEventListener( PushNotificationEvent.NOTIFICATION, onPushNotification );
PushNotifications.service.addEventListener( PushNotificationEvent.FOREGROUND_NOTIFICATION,  onForegroundNotificationReceived );
PushNotifications.service.addEventListener( PushNotificationEvent.ERROR, pn_errorHandler );
var registerResult:Boolean = PushNotifications.service.register(GCM_SENDER_ID);

But after register call no event has fired. It just do standard register routine and that's it.

Please help!

Answers


This feature was only added in one of the more recent releases. Always try to update your extensions before reporting a bug.

Thanks


Just updated to the latest version 2.6.iOS.2.1 from GitHub and it works just fine.


Need Your Help

Swift 2.1 - How to pass index path row of collectionView cell to segue

ios swift

From the main controller that I have integrated collection view, I want to pass selected cell index path to another view controller (detail view)

Can a 64 bit EXE link against 32-bit DLLs?

windows 64-bit dll

I ask because I noticed that many 64 bit EXEs link against what appear to be 32-bit DLLs.