You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
For Android, I was receiving an empty string "" on the register callback. Everytime I initialized the plugin, it would consistently return an empty string. When I un-installed the app and re-installed it, I received an actual token.
I don't know why this would occur, but I wanted to report it.
I think it has to do with the fact that register call in PushPlugin.java uses SharedPreferences to return a stored registration id. If, for some reason, both of the top two if statements fail in the following code block, it will just rely on (hope that there is) a stored registration id.
See PushPlugin.java:
// first time run get new token
if ("".equals(savedSenderID) && "".equals(savedRegID)) {
token = InstanceID.getInstance(getApplicationContext()).getToken(senderID, GCM);
}
// new sender ID, re-register
else if (!savedSenderID.equals(senderID)) {
token = InstanceID.getInstance(getApplicationContext()).getToken(senderID, GCM);
}
// use the saved one
else {
token = sharedPref.getString(REGISTRATION_ID, "");
}
The text was updated successfully, but these errors were encountered:
* 'master' of github.com:phonegap/phonegap-plugin-push:
Version 1.4.2
Issue phonegap#299: 1.4.x not showing notification on Android
Version 1.4.1
Issue phonegap#295: data.registrationId is empty string "" on register event callback
Issue phonegap#291: Reregister on Android
[typo] fixing .finish() example
Update CHANGELOG
Version 1.4.0
Issue phonegap#93: Receive Notifications in Background
For Android, I was receiving an empty string "" on the register callback. Everytime I initialized the plugin, it would consistently return an empty string. When I un-installed the app and re-installed it, I received an actual token.
I don't know why this would occur, but I wanted to report it.
I think it has to do with the fact that register call in PushPlugin.java uses SharedPreferences to return a stored registration id. If, for some reason, both of the top two if statements fail in the following code block, it will just rely on (hope that there is) a stored registration id.
See PushPlugin.java:
The text was updated successfully, but these errors were encountered: