Fix another PN issue

This commit is contained in:
Sylvain Berfini 2012-09-26 15:04:19 +02:00
parent 4ede881452
commit f04f596600

View file

@ -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 {