code: private void createOrUpdatePushServiceToken(final String token, String httpURI, String httpMethod, JSONObject data, final SharedPreferences prefs) {
          signalingChannel.sendRESTMessage(httpMethod, httpURI, data, new RespokeSignalingChannel.RESTListener() {
              @Override
              public void onSuccess(Object response) {
                  if (response instanceof JSONObject) {
                      try {
                          JSONObject responseJSON = (JSONObject) response;
                          pushServiceID = responseJSON.getString("id");
  
                          SharedPreferences.Editor editor = prefs.edit();
                          editor.putString(PROPERTY_LAST_VALID_PUSH_TOKEN, token);
                          editor.putString(PROPERTY_LAST_VALID_PUSH_TOKEN_ID, pushServiceID);
                          editor.apply();
                      } catch (JSONException e) {
                          Log.d(TAG, "Unexpected response from server while registering push service token");
                      }
                  } else {
                      Log.d(TAG, "Unexpected response from server while registering push service token");
                  }
              }
  
              @Override
              public void onError(String errorMessage) {
                  Log.d(TAG, "Error registering push service token: " + errorMessage);
              }
          });
      }
docs: ** Private methods