Fix another PN issue
This commit is contained in:
parent
4ede881452
commit
f04f596600
1 changed files with 3 additions and 2 deletions
|
@ -50,13 +50,14 @@ public class ApiEightPlus {
|
|||
String currentPushSenderID = prefs.getString(context.getString(R.string.push_sender_id_key), null);
|
||||
if (regId.equals("") || currentPushSenderID == null || !currentPushSenderID.equals(newPushSenderID)) {
|
||||
GCMRegistrar.register(context, newPushSenderID);
|
||||
String newRegId = GCMRegistrar.getRegistrationId(context);
|
||||
|
||||
Log.d("Push Notification : storing current sender id = " + newPushSenderID);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putString(context.getString(R.string.push_sender_id_key), newPushSenderID);
|
||||
|
||||
Log.d("Push Notification : new id = " + regId);
|
||||
editor.putString(context.getString(R.string.push_reg_id_key), regId);
|
||||
Log.d("Push Notification : new id = " + newRegId);
|
||||
editor.putString(context.getString(R.string.push_reg_id_key), newRegId);
|
||||
|
||||
editor.commit();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue