Commit 48a4105c7f1b81db2bed5154a98d2cc279215c81

Authored by 卢小曼
Committed by yinhongbo
1 parent 5e09487c

更新jar包,补充新方法

app/libs/libcnliveuser.jar
No preview for this file type
app/src/main/java/com/cnlive/libs/OtherActivity.java
... ... @@ -33,7 +33,8 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener
33 33  
34 34 private EditText feedbackMsg;
35 35 private Button feedback, uploadFace;
36   - private TextView modifyMobile, updateUserExtInfo, queryUserInfo, modifyUserInfo, modifyPwdWithMobile, bindThird, sendMessage, queryMoreUserInfo, modifyPwdWithOldpwd;
  36 + private TextView modifyMobile, updateUserExtInfo, queryUserInfo, modifyUserInfo, modifyPwdWithMobile, bindThird, sendMessage, queryMoreUserInfo, modifyPwdWithOldpwd
  37 + , modifyPwdWithEmail, checkVerifyCodeBeforeRegistered, checkVerifycodeBeforeQuicklogin, thirdPartyLoginWithMobile, thirdPartyRegisterMustMobile;
37 38  
38 39  
39 40 private String uid;
... ... @@ -92,6 +93,26 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener
92 93 //通过原密码修改密码
93 94 modifyPwdWithOldpwd = (TextView) findViewById(R.id.modify_pwd_through_oldpwd);
94 95 modifyPwdWithOldpwd.setOnClickListener(this);
  96 +
  97 + //通过邮箱修改密码
  98 + modifyPwdWithEmail = (TextView) findViewById(R.id.modify_pwd_through_email);
  99 + modifyPwdWithEmail.setOnClickListener(this);
  100 +
  101 + //注册前校验手机验证码
  102 + checkVerifyCodeBeforeRegistered= (TextView) findViewById(R.id.check_verifycode_before_registered);
  103 + checkVerifyCodeBeforeRegistered.setOnClickListener(this);
  104 +
  105 + //快捷登录前校验手机验证码
  106 + checkVerifycodeBeforeQuicklogin= (TextView) findViewById(R.id.check_verifycode_before_quicklogin);
  107 + checkVerifycodeBeforeQuicklogin.setOnClickListener(this);
  108 +
  109 + //第三方登录(可选手机号)
  110 + thirdPartyLoginWithMobile= (TextView) findViewById(R.id.third_party_login_with_mobile);
  111 + thirdPartyLoginWithMobile.setOnClickListener(this);
  112 +
  113 + //第三方注册强制绑定手机号
  114 + thirdPartyRegisterMustMobile= (TextView) findViewById(R.id.third_party_register_must_mobile);
  115 + thirdPartyRegisterMustMobile.setOnClickListener(this);
95 116 }
96 117  
97 118 @Override
... ... @@ -583,6 +604,176 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener
583 604 }
584 605 }
585 606 });
  607 + break;
  608 + case R.id.modify_pwd_through_email:
  609 + UserUtil.modifyPwdWithEmail("email", "newPwd", new Callback() {
  610 + @Override
  611 + public void onState(int what, String extra, Object obj) {
  612 + showToast(extra + " : " + obj.toString());
  613 + switch (what) {
  614 + case IUserService.SUCCESS:
  615 + //成功
  616 + break;
  617 + case IUserService.ERROR_PARAM:
  618 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_param);
  619 + break;
  620 + case IUserService.ERROR_MAIL_FORMAT:
  621 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_mail_format);
  622 + break;
  623 + case IUserService.ERROR_PASSWORD_CONTENT:
  624 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_password_content);
  625 + break;
  626 + case IUserService.ERROR_PASSWORD_EQUAL_USERNAME:
  627 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_password_equal_username);
  628 + break;
  629 + case IUserService.ERROR_PASSWORD_CANNOT_CONTIGUOUS:
  630 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_password_cannot_be_contiguous);
  631 + break;
  632 + case IUserService.ERROR_PASSWORD_CANNOT_CONTIGUOUS_SAME:
  633 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_password_cannot_be_contiguous_same);
  634 + break;
  635 + case IUserService.ERROR_CLIENT_PLAT:
  636 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_client_plat);
  637 + break;
  638 + case IUserService.ERROR_EMAIL_UNREGISTERED:
  639 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_email_unregistered);
  640 + break;
  641 + case IUserService.ERROR_OPERATE:
  642 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_operate);
  643 + break;
  644 + case IUserService.ERROR_OTHER:
  645 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_other);
  646 + break;
  647 + }
  648 + }
  649 + });
  650 + break;
  651 + case R.id.check_verifycode_before_registered:
  652 + UserUtil.checkVerifyCodeBeforeRegistered("mobile", "verificationCode", new Callback() {
  653 + @Override
  654 + public void onState(int what, String extra, Object obj) {
  655 + showToast(extra + " : " + obj.toString());
  656 + switch (what) {
  657 + case IUserService.SUCCESS:
  658 + //成功
  659 + break;
  660 + case IUserService.ERROR_PARAM:
  661 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_param);
  662 + break;
  663 + case IUserService.ERROR_MOBILE:
  664 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_mobile);
  665 + break;
  666 + case IUserService.ERROR_VERIFICATION_CODE_LENGTH:
  667 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_verfication_code_length);
  668 + break;
  669 + case IUserService.ERROR_CLIENT_PLAT:
  670 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_client_plat);
  671 + break;
  672 + case IUserService.ERROR_VERIFICATION_CODE:
  673 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_verfication_code);
  674 + break;
  675 + case IUserService.ERROR_OTHER:
  676 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_other);
  677 + break;
  678 + }
  679 + }
  680 + });
  681 + break;
  682 + case R.id.check_verifycode_before_quicklogin:
  683 + UserUtil.checkVerifyCodeBeforeQuickLogin("mobile", "verificationCode", new Callback() {
  684 + @Override
  685 + public void onState(int what, String extra, Object obj) {
  686 + showToast(extra + " : " + obj.toString());
  687 + switch (what) {
  688 + case IUserService.SUCCESS:
  689 + //成功
  690 + break;
  691 + case IUserService.ERROR_PARAM:
  692 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_param);
  693 + break;
  694 + case IUserService.ERROR_MOBILE:
  695 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_mobile);
  696 + break;
  697 + case IUserService.ERROR_VERIFICATION_CODE_LENGTH:
  698 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_verfication_code_length);
  699 + break;
  700 + case IUserService.ERROR_CLIENT_PLAT:
  701 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_client_plat);
  702 + break;
  703 + case IUserService.ERROR_VERIFICATION_CODE:
  704 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_verfication_code);
  705 + break;
  706 + case IUserService.ERROR_OTHER:
  707 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_other);
  708 + break;
  709 + }
  710 + }
  711 + });
  712 + break;
  713 + case R.id.third_party_login_with_mobile:
  714 + UserUtil.thirdPartyLoginWithMobile(1, "thirdPartyId", "frmId", new Callback() {
  715 + @Override
  716 + public void onState(int what, String extra, Object obj) {
  717 + showToast(extra + " : " + obj.toString());
  718 + switch (what) {
  719 + case IUserService.SUCCESS:
  720 + //成功
  721 + break;
  722 + case IUserService.ERROR_PARAM:
  723 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_param);
  724 + break;
  725 + case IUserService.ERROR_THIRD_PLAT_ID:
  726 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_third_plat_id);
  727 + break;
  728 + case IUserService.ERROR_CLIENT_PLAT:
  729 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_client_plat);
  730 + break;
  731 + case IUserService.ERROR_MOBILE_NOT_REGISTER:
  732 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_mobile_not_register);
  733 + break;
  734 + case IUserService.ERROR_OTHER:
  735 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_other);
  736 + break;
  737 + }
  738 + }
  739 + });
  740 + break;
  741 + case R.id.third_party_register_must_mobile:
  742 + UserUtil.thirdPartyLoginMustMobile(1, "thirdPartyId", "nickName", "gender", "location", "faceUrl", "frmId", "mobile", "verificationCode", "pawd", new Callback() {
  743 + @Override
  744 + public void onState(int what, String extra, Object obj) {
  745 + showToast(extra + " : " + obj.toString());
  746 + switch (what) {
  747 + case IUserService.SUCCESS:
  748 + //成功
  749 + break;
  750 + case IUserService.ERROR_PARAM:
  751 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_param);
  752 + break;
  753 + case IUserService.ERROR_THIRD_PLAT_ID:
  754 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_third_plat_id);
  755 + break;
  756 + case IUserService.ERROR_CLIENT_PLAT:
  757 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_client_plat);
  758 + break;
  759 + case IUserService.ERROR_VERIFICATION_CODE:
  760 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_verfication_code);
  761 + break;
  762 + case IUserService.ERROR_MOBILE:
  763 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_mobile);
  764 + break;
  765 + case IUserService.ERROR_VERIFICATION_CODE_LENGTH:
  766 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_verfication_code_length);
  767 + break;
  768 + case IUserService.ERROR_REGISTERED_PLEASE_LOGIN:
  769 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_registered_please_login);
  770 + break;
  771 + case IUserService.ERROR_OTHER:
  772 + Log.e(TAG_SEND_MSG_BEF_FINDBACK, IUserService.message_error_other);
  773 + break;
  774 + }
  775 + }
  776 + });
586 777 }
587 778 }
588 779  
... ...
app/src/main/res/layout/activity_other.xml
... ... @@ -134,6 +134,7 @@
134 134 </LinearLayout>
135 135  
136 136 <LinearLayout
  137 + android:id="@+id/bottom_layout1"
137 138 android:layout_width="match_parent"
138 139 android:layout_height="wrap_content"
139 140 android:layout_below="@id/bottom_layout"
... ... @@ -158,4 +159,73 @@
158 159  
159 160 </LinearLayout>
160 161  
  162 + <LinearLayout
  163 + android:id="@+id/bottom_layout2"
  164 + android:layout_width="match_parent"
  165 + android:layout_height="wrap_content"
  166 + android:layout_below="@id/bottom_layout1"
  167 + android:layout_marginTop="10dp"
  168 + android:orientation="horizontal">
  169 +
  170 + <TextView
  171 + android:id="@+id/modify_pwd_through_email"
  172 + android:layout_width="0dp"
  173 + android:layout_height="wrap_content"
  174 + android:layout_weight="1"
  175 + android:text="通过邮箱修改密码"
  176 + android:textColor="#0000ff" />
  177 +
  178 + <TextView
  179 + android:id="@+id/check_verifycode_before_registered"
  180 + android:layout_width="0dp"
  181 + android:layout_height="wrap_content"
  182 + android:layout_weight="1"
  183 + android:text="注册前校验手机验证码"
  184 + android:textColor="#0000ff" />
  185 +
  186 + </LinearLayout>
  187 +
  188 + <LinearLayout
  189 + android:id="@+id/bottom_layout3"
  190 + android:layout_width="match_parent"
  191 + android:layout_height="wrap_content"
  192 + android:layout_below="@id/bottom_layout2"
  193 + android:layout_marginTop="10dp"
  194 + android:orientation="horizontal">
  195 +
  196 + <TextView
  197 + android:id="@+id/check_verifycode_before_quicklogin"
  198 + android:layout_width="0dp"
  199 + android:layout_height="wrap_content"
  200 + android:layout_weight="1"
  201 + android:text="快捷登录前校验手机验证码"
  202 + android:textColor="#0000ff" />
  203 +
  204 + <TextView
  205 + android:id="@+id/third_party_login_with_mobile"
  206 + android:layout_width="0dp"
  207 + android:layout_height="wrap_content"
  208 + android:layout_weight="1"
  209 + android:text="第三方登录(可选手机号)"
  210 + android:textColor="#0000ff" />
  211 +
  212 + </LinearLayout>
  213 +
  214 + <LinearLayout
  215 + android:layout_width="match_parent"
  216 + android:layout_height="wrap_content"
  217 + android:layout_below="@id/bottom_layout3"
  218 + android:layout_marginTop="10dp"
  219 + android:orientation="horizontal">
  220 +
  221 + <TextView
  222 + android:id="@+id/third_party_register_must_mobile"
  223 + android:layout_width="0dp"
  224 + android:layout_height="wrap_content"
  225 + android:layout_weight="1"
  226 + android:text="第三方注册强制绑定手机号"
  227 + android:textColor="#0000ff" />
  228 +
  229 + </LinearLayout>
  230 +
161 231 </RelativeLayout>
... ...