code: private static void storeRegistrationId(Context context, String regId) {
          final SharedPreferences prefs = getGcmPreferences(context);
          int appVersion = getAppVersion(context);
          SharedPreferences.Editor editor = prefs.edit();
          editor.putString(PROPERTY_REG_ID, regId);
          editor.putInt(PROPERTY_APP_VERSION, appVersion);
          editor.commit();
      }
docs: Stores the registration ID and the app versionCode in the application's
  {@code SharedPreferences}.
  
  @param context application's context.
  @param regId registration ID