예제 #1
0
 /** 验证手机号 */
 public void signMobile() {
   String code = setCode.getText().toString();
   AVUser user = AVUser.getCurrentUser();
   if (TextUtils.isEmpty(code) || user == null || !user.isAuthenticated()) return;
   showLoadingDialog("正在验证手机号");
   AVUser.verifyMobilePhoneInBackground(
       code,
       new AVMobilePhoneVerifyCallback() {
         @Override
         public void done(AVException e) {
           if (e == null) {
             Utils.showToast(UserActivity.this, "手机号验证成功!");
           } else {
             textView.setText(e.getMessage());
           }
           cancelLoadingDialog();
         }
       });
 }