FirebaseUI-Android
FirebaseUI-Android copied to clipboard
i want only phone number authentication
how to change only phone number authentication please give me source code
You can use below snippet to sign in only with phone number and it will directly open phone number activity instead of default activity of this library which shows all the different options to log in.
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setAvailableProviders(
Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER).build()))
.build(),
RC_SIGN_IN);
It means if you have enabled only one way to sign in, this library will not show custom activity with one option. If you enable more than one way to sign in, then only it will show custom activity with all sign in options. I am using the same code in my app.
thanks lot man
Thanks @thakkaryash94 !