Search code examples
push-notificationairgoogle-cloud-messaginganedistriqt

Distriqt PushNotification event NOTIFICATION_SELECTED won't fire (VERSION = 6)


Distriqt PushNotification version 6.0.029 I use PushNotificationsHelper in the example folder, there are few issues as below:

  1. For initialize PushNotifications.isSupported return true, but once I call register and it return false again. I ending up commented //PushNotifications.isSupported for each of the call function to make sure it works. Ok, it works and I received registration token.

  2. I use GCM playload, notification field just try to display very simple notification title and body. Ok, I received notification popup in background but when I select the notification, the PushNotificationEvent.NOTIFICATION_SELECTED event won't firing, this the critical issue in my project.

  3. When I use Distriqt playload, data field. I received notification silently when in background, nothing show up (Why?). And I received data dispatched from event PushNotificationEvent.NOTIFICATION this fine. FYI, I enabled service.enableNotificationsWhenActive = true

Please read my project setup for the ane extensions included:

  1. com.distriqt.PushNotifications
  2. com.distriqt.Core
  3. com.distriqt.playservices.GCM
  4. com.distriqt.AndroidSupport
  5. com.distriqt.playservices.Base

Device tested:

  1. Mi Note (Android version 6.0.1)
  2. Samsung Galaxy S3 (Android version 4.1.2)

Can anyone please advice where do i make mistake or it's the native extension issue? Thanks in advance.


Solution

  • If you ask your question in the github issue tracker (https://github.com/distriqt/ANE-PushNotifications/issues) we'll help you through the issues you are having.

    Most likely your issue is that your data payload doesn't contain the minimum fields for the notification display, i.e. title and alert.

    Also, make sure you have the latest version of the support ANEs (Core, AndroidSupport and play services). This can cause issues.