cordova-plugin-firebase
cordova-plugin-firebase copied to clipboard
onTokenRefresh is called is the app is closed?
Hi, i want to know if the onTokenRefresh() method can be called while the app is closed.
I mean, native sendToken() sends a javascript command to the cordova webview when the native onTokenRefresh() is called, but if the app is closed theres no cordova webview to receive the command. In this case javascript onTokenRefresh() will only be called when the user opens the app?
This means that we can have users not receiving notifications because their token changed and was not sync with the API right?
Thanks in advance.
+1
+1 Did you find a solution?
Hey guys, is there any update on this topic ?
This plugin is really awesome, works really good and would be amazing to have this problem solved.
Thanks
I haven't found a solution, but I discovered that firebase keeps the old token pointing to the new one for 24h (if you send a message to an old token that has been updated less than 24h ago, the device will receive it). You can find this information in their documentation.