private void requestVerifyCode(String verifyCode) {
   CallService csPost =
       new CallService(
           CallMethod.POST, cmdVerifySignupPhone, null, null, deviceId, version, locale, this);
   try {
     String url =
         Webservice.get(
             Webservice.confirmSignupPhone,
             URLEncoder.encode(phoneCode, "UTF-8"),
             URLEncoder.encode(phoneNumber, "UTF-8"),
             URLEncoder.encode(verifyCode, "UTF-8"));
     csPost.execute(url);
   } catch (UnsupportedEncodingException e) {
     Log.d(TAG + ":checkRegister", e.getMessage());
     hideLoading();
   }
 }
Ejemplo n.º 2
0
 private void requestGetUserInfo() {
   CallService customPost =
       new CallService(
           CallMethod.POST,
           "getUserInfo",
           mActivity.getUserId(),
           mActivity.getToken(),
           mActivity.getDeviceId(),
           mActivity.getVersion(),
           mActivity.getLocale(),
           new JsonCallBackListener() {
             @Override
             public void handleData(String mCmd, JSONObject json) throws JSONException {
               //                if (mActivity != null) {
               //                    mActivity.hideLoading();
               //                }
               if (json != null) {
                 int status = json.getInt("StatusCode");
                 if (status == 1) {
                   JSONObject userInfo = json.getJSONArray("Data").getJSONObject(0);
                   BLSharePreferences.setUserInfo(context, userInfo.toString());
                   setInfo(userInfo);
                   sendBroadcastUpdateProfile();
                 }
               }
               hideLoading();
             }
           });
   try {
     String url = Webservice.makeGetProfileURL(userID);
     customPost.execute(url);
   } catch (Exception e) {
     hideLoading();
     Logs.log(e);
     //            if (mActivity != null) {
     //                mActivity.hideLoading();
     //            }
   }
 }