我没有使用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);
}