docs: public static String getRegistrationId(Context context) {
          final SharedPreferences prefs = getGCMPreferences(context);
          String registrationId = prefs.getString(PROPERTY_REG_ID, "");
          // check if app was updated; if so, it must clear registration id to
          // avoid a race condition if GCM sends a message
          int oldVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
          int newVersion = getAppVersion(context);
          if (oldVersion != Integer.MIN_VALUE && oldVersion != newVersion) {
              Log.v(TAG, "App version changed from " + oldVersion + " to " +
                      newVersion + "; resetting registration id");
              clearRegistrationId(context);
              registrationId = "";
          }
          return registrationId;
      }