Skip to content

Commit 449a6c6

Browse files
author
Devendra
committed
[ #74346168 ] deleting registration id from preferences when sender id is set/reset
1 parent 028db69 commit 449a6c6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • android/examples/PubnubExample/src/com/pubnub/examples/pubnubExample10

‎android/examples/PubnubExample/src/com/pubnub/examples/pubnubExample10/MainActivity.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@ private void setSenderId() {
288288
@Override
289289
public void onClick(DialogInterface arg0, int arg1) {
290290
SENDER_ID = edSenderId.getEditableText().toString();
291+
int appVersion = getAppVersion(context);
292+
SharedPreferences.Editor editor = prefs.edit();
293+
editor.putString("REG_ID", "");
294+
editor.putInt(APP_VERSION, appVersion);
295+
editor.commit();
291296
saveCredentials();
292297
}
293298

0 commit comments

Comments
 (0)