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.
Without this, if you unregister and then initialize, it will return an old registrationId not associated with any instanceId. You'll be in a weird state that the application will think it's registered but it's not. That's due to this logical block on register:
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, "");
}
I'm adding this to my fork because some strange reason, I'm getting an emtpy string "" for a registrationId upon initialization of the plugin (See #295). Regardless, my work around is to unregister if I didn't receive an actual registrationId and then re-register. However, without the code above, it will just fallback to old, outdated registrationId - in my case an empty string.
The text was updated successfully, but these errors were encountered:
I'm suggesting we add the following to PushPlugin.java at line 127.
Without this, if you unregister and then initialize, it will return an old registrationId not associated with any instanceId. You'll be in a weird state that the application will think it's registered but it's not. That's due to this logical block on register:
I'm adding this to my fork because some strange reason, I'm getting an emtpy string "" for a registrationId upon initialization of the plugin (See #295). Regardless, my work around is to unregister if I didn't receive an actual registrationId and then re-register. However, without the code above, it will just fallback to old, outdated registrationId - in my case an empty string.
The text was updated successfully, but these errors were encountered: