Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
Issue #315: Getting Error : Empty registration ID received from GCM
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Nov 18, 2015
1 parent e96d38d commit 9522193
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/android/com/adobe/phonegap/push/PushPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void run() {
String savedRegID = sharedPref.getString(REGISTRATION_ID, "");

// first time run get new token
if ("".equals(savedSenderID) && "".equals(savedRegID)) {
if ("".equals(savedRegID)) {
token = InstanceID.getInstance(getApplicationContext()).getToken(senderID, GCM);
}
// new sender ID, re-register
Expand All @@ -88,6 +88,7 @@ else if (!savedSenderID.equals(senderID)) {
PushPlugin.sendEvent( json );
} else {
callbackContext.error("Empty registration ID received from GCM");
return;
}
} catch (JSONException e) {
Log.e(LOG_TAG, "execute: Got JSON Exception " + e.getMessage());
Expand Down

0 comments on commit 9522193

Please sign in to comment.