in Education by
My code: PhoneAuthProvider.getInstance().verifyPhoneNumber( phoneNumber, // Phone number to verify 60, // Timeout duration TimeUnit.SECONDS, // Unit of timeout this, // Activity (for callback binding) new PhoneAuthProvider.OnVerificationStateChangedCallbacks() { @Override public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) { } @Override public void onVerificationFailed(FirebaseException e) { } @Override public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) { super.onCodeSent(s, forceResendingToken); otpSent = s; Log.d("AuthTest", "code sent!"); } }); Here the phone number is entered in international format (+91 and 10 digits for India). Here, onCodeSent is not called if the user selects a valid phone number of his choice. On the other hand, if I go to Firebase console and enter a phone number for testing, onCodeSent is executed. I was following a YouTube tutorial here. Many people have asked this developer about the same problem "OTP (i.e, verification code) is not received". Author has not responded. What's happening here? Has Firebase changed anything or set a limitation on free accounts, or am I missing something? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The issue was of registering the app in the Firebase. Package name and SHA-1 key are needed. This I came to know by intercepting the FirebaseException at onVerificationFailed callback as @Tamir Abutbul suggested. Once the app was registered, it started working. Also, when I tried to run the app from my other Android Studio environment on a different mac, the app registration issue cropped again. This time it told me the SHA-1 key that I entered earlier was not from this mac. So I had to generate another key and add it (you can add multiple keys).

Related questions

0 votes
    (This is a random image of showing a Dialog found on the Internet.) I've been implementing a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
0 votes
    I am trying to build a mailto: uri to send a mail using the GMail app. I would like to use the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I have an application I'm building with Firebase. Essentially, I'm trying to build an authentication system ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I am using Firebase authentication and react-redux in my app. I added firebase.auth().onAuthStateChanged to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I am using Firebase authentication and react-redux in my app. I added firebase.auth().onAuthStateChanged to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I'm looking at making an custom Android object Serializable. Should be simple I just cannot find a easy ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
0 votes
    I've made a fresh eclipse reinstall + Android SDK v4.0. I am trying to create a new 4.0 AVD ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 30, 2022 in Education by JackTerrance
0 votes
    I'm trying to execute the following command: arp -a and I would like to redirect the output to a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    Here some snippet of my code. when first time RecyclerView create I have to used recyclerView.scrollToPosition( ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I have a fragment with a view and an options menu: public class OfferingsFragment extends Fragment { public ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I've noticed on Marshmallow (e.g. Nexus 6P) and also on some more recently updated Lollipop phones ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I'm trying to execute the following command: arp -a and I would like to redirect the output to a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    i have this problem that i want to upload image on a server through multi-part form but its keep ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    I want making multi-bluetooth from Android studio. I found multi-bluetooth java code libraries. but I am ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    i want to run a task every 5 minutes. i've tried to solve it with an IntentService and ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 26, 2022 in Education by JackTerrance
...