private void requestForgotPasswordByEmail(String email) { showLoading(); CallServiceCustomPOST csPost = new CallServiceCustomPOST("forgotPassword", userID, token, deviceId, version, locale, this); try { String url = RemoteMethods.get(RemoteMethods.forgotPasswordByEmail, URLEncoder.encode(email, "UTF-8")); csPost.execute(url); } catch (UnsupportedEncodingException e) { Log.d(TAG + ":checkRegister", e.getMessage()); hideLoading(); } }
/** ************************ Get loved one by id chat ************************* */ private void requestGetCircleItem(final ChatItem item) { mActivity.showLoading(); CallServiceCustomGET cs = new CallServiceCustomGET( "getLovedOneByIdChat", mActivity.getUserId(), mActivity.getToken(), mActivity.getDeviceId(), mActivity.getVersion(), mActivity.getLocale(), new CallServiceCustomGET.JsonCallback() { @Override public void handleData(String mCmd, JSONObject json) throws JSONException { try { if (json != null) { int status = json.getInt("status"); if (status == 1) { try { JSONObject info = json.getJSONObject("data"); CircleItem circleItem = CircleItem.parseCircleItem(info); if (circleItem != null) { circleItem.setChatGroupID(item.getChatGroupID()); item.setCircleItem(circleItem); mActivity.hideLoading(); Intent i = new Intent(mActivity, ChatScreen.class); i.putExtra(Actions.Extras.ITEM, circleItem); mActivity.startActivity(i); } else { // Log.e(TAG, "Can not get User Info @@"); UIUtils.alert(mActivity, "Can not get User Info @@"); } } catch (Exception e) { UIUtils.alert(mActivity, "EXCEPTION: " + e.getMessage()); } } else { try { String errorCode = json.get("errorCode").toString(); // Log.e(TAG+":handleData", "ERROR " + errorCode + " !!"); UIUtils.alert(mActivity, "ERROR " + errorCode + " !!"); } catch (Exception e) { // Log.e(TAG+":handleData", e.getMessage()); UIUtils.alert(mActivity, "EXCEPTION: " + e.getMessage()); } } } } catch (Exception e) { UIUtils.alert(mActivity, "EXCEPTION: " + e.getMessage()); } mActivity.hideLoading(); } }); try { String url = RemoteMethods.get( RemoteMethods.getLoveByIdChat, mActivity.getUserId(), item.getChatGroupID()); cs.execute(url); } catch (Exception e) { mActivity.hideLoading(); UIUtils.alert(mActivity, "EXCEPTION: " + e.getMessage()); } }