@SuppressLint("StaticFieldLeak")
public void sendCode(final String phone) {
new AsyncTask() {
boolean res;
@Override
protected Void doInBackground(Void... params) {
try {
AVOSCloud.requestSMSCode(phone, "Android武汉老人", "注册", 1);
res = true;
} catch (AVException e) {
e.printStackTrace();
res = false;
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
if (res) {
AppToast.showShortText(context, R.string.sendSucceed);
} else {
AppToast.showShortText(context, R.string.sendFailed);
time.cancel();
mRightbtn.setText("获取验证码");
mRightbtn.setClickable(true);
x = 0;
}
}
}.execute();
}
报错,发送失败
异常
com.avos.avoscloud.AVException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
-
创建时间
18年3月7日
-
最后回复
18年3月7日
-
2
回复
-
1.2K
浏览
-
2
用户
-
1
链接