pushbots/phonegap

"users:ids" event not fired when the app is reloaded by clicking a push notification

Closed this issue · 1 comments

I am using plugin 1.4.7 for android, and when clicking a push a notification, the cordova app is reloaded, but in this reload, the app is not firing the event "users:ids" as when the app is started manually. It only sends the "notification:clicked" event.

PB3: execute: action=initialize
PB3: Entered custom init function 56e2ac86177959441c8b4567549460993070
PB3: Loglevel: DEBUG
PB3: PushBots Library v3.0.1
PB3: Application ID = 56e2ac86177959441c8b4567
PB3: Google Sender Id = 549460993070
PB3: execute: options={"sender_id":"549460993070"}
PB3: registerForRemoteNotifications:549460993070
PB3: Sending success result: {"type":"opened","data": {...}}

That is a problem because we need the token to identify the device and we can't get it with the event "users:ids" as when the app starts normally.

We have tried to get the token manually with getRegistrationId inside the "notification:clicked" event callback, but it is not working. We have opened another issue for this ( #70 )

This issue is not solved. Tested in 1.4.9.

The same exact problem remains.