小编use*_*839的帖子

未在 Firebase 电话身份验证中接收代码。

我正在尝试在我的应用中实施 Firebase 电话身份验证。我参考了 GitHub 上的 firebase android 文档,但无法通过短信获取代码。

我不知道为什么会这样?我正在真实设备上对其进行测试。

另外,我正在向另一个人发送短信,因为真实设备没有 SIM 卡。但我确信这不是问题。这样对吗?

这是我的代码

 void logIn(){

    mCallbacks = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {

        @Override
        public void onVerificationCompleted(PhoneAuthCredential credential) {
            // This callback will be invoked in two situations:
            // 1 - Instant verification. In some cases the phone number can be instantly
            //     verified without needing to send or enter a verification code.
            // 2 - Auto-retrieval. On some devices Google Play services can automatically
            //     detect the incoming verification SMS and perform …
Run Code Online (Sandbox Code Playgroud)

android firebase firebase-authentication

6
推荐指数
1
解决办法
5083
查看次数