Firebase未发送OTP号码

时间:2018-11-21 21:51:12

标签: android kotlin firebase-authentication

我没有使用firebase获得代码变量。如果我手动输入,那么它将正常工作,否则我不会收到短信。

@Override
public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {

    Log.d(TAG,"onVerificationCompleted:" + phoneAuthCredential);

    String code = phoneAuthCredential.getSmsCode();
   // String code="000000";
    System.out.println("Hello Phone Number2"+code);
    if (code != null) {
        editText.setText(code);
      // verifyCode(code);
        signInWithCredential(phoneAuthCredential);


    }

0 个答案:

没有答案