-
Notifications
You must be signed in to change notification settings - Fork 1.9k
android M wear case #691
Comments
@bitgandtter how do you send the push and what is the payload? |
The push is sent on server side using PHP zendframework/zendservice-google-gcm. The payload is a simple text message. But besides how its sent and what its in it the recepción should work the same right. The wear case here is why it only works if the event listeners are place just after initialization. And wont work if i try to register them in some other time after that with the specified funcions |
It was a design flaw, i dont know that the registration event will be emit after init and of course if you register a listener for that event after it was triggered you will never get it. I advice to add a func to obtain the registrationId so if the event was already triggered you can access the id from that func and wont need to listen to it. |
This thread has been automatically locked. |
I have this service:
I call the init function on app start and other services that inject this one call the listenNotification providing a callback to handle the notification data.
NOTE: that the code has been modified to use a dummy function to log the data of the notification on both scenarios on the init function and on the listenNotification function.
For some reason only the function registered on the init receive the notification data, any other registered with the listenNotification function does not receive the notification.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 6.0
Cordova 6.0
plugin version 1.6
What can be the issue
The text was updated successfully, but these errors were encountered: