public static final class AuthUI.IdpConfig.PhoneBuilder extends AuthUI.IdpConfig.Builder
AuthUI.IdpConfig builder for the phone provider.| Constructor and Description |
|---|
PhoneBuilder() |
| Modifier and Type | Method and Description |
|---|---|
AuthUI.IdpConfig |
build() |
AuthUI.IdpConfig.PhoneBuilder |
setBlacklistedCountries(List<String> countries)
Sets the countries to be removed from the country code selector for phone
authentication.
|
AuthUI.IdpConfig.PhoneBuilder |
setDefaultCountryIso(String iso)
Set the default country code that will be used in the phone verification sign-in
flow.
|
AuthUI.IdpConfig.PhoneBuilder |
setDefaultNumber(String number) |
AuthUI.IdpConfig.PhoneBuilder |
setDefaultNumber(String iso,
String number)
Set the default phone number that will be used to populate the phone verification
sign-in flow.
|
AuthUI.IdpConfig.PhoneBuilder |
setWhitelistedCountries(List<String> countries)
Sets the country codes available in the country code selector for phone
authentication.
|
getParams, setProviderId@NonNull public AuthUI.IdpConfig.PhoneBuilder setDefaultNumber(@NonNull String number)
number - the phone number in international formatsetDefaultNumber(String, String)@NonNull public AuthUI.IdpConfig.PhoneBuilder setDefaultNumber(@NonNull String iso, @NonNull String number)
iso - the phone number's country codenumber - the phone number in local format@NonNull public AuthUI.IdpConfig.PhoneBuilder setDefaultCountryIso(@NonNull String iso)
iso - country isopublic AuthUI.IdpConfig.PhoneBuilder setWhitelistedCountries(@NonNull List<String> countries)
setBlacklistedCountries(List).
If both are called, an exception will be thrown.
Inputting an e-164 country code (e.g. '+1') will include all countries with +1 as its code. Example input: {'+52', 'us'} For a list of country iso or codes, see Alpha-2 isos here: https://en.wikipedia.org/wiki/ISO_3166-1 and e-164 codes here: https://en.wikipedia.org/wiki/List_of_country_calling_codes
countries - a non empty case insensitive list of country codes
and/or isos to be allowlistedIllegalArgumentException - if an empty allowlist is provided.NullPointerException - if a null allowlist is provided.public AuthUI.IdpConfig.PhoneBuilder setBlacklistedCountries(@NonNull List<String> countries)
setWhitelistedCountries(List).
If both are called, an exception will be thrown.
Inputting an e-164 country code (e.g. '+1') will include all countries with +1 as its code. Example input: {'+52', 'us'} For a list of country iso or codes, see Alpha-2 codes here: https://en.wikipedia.org/wiki/ISO_3166-1 and e-164 codes here: https://en.wikipedia.org/wiki/List_of_country_calling_codes
countries - a non empty case insensitive list of country codes
and/or isos to be blocklistedIllegalArgumentException - if an empty blocklist is provided.NullPointerException - if a null blocklist is provided.public AuthUI.IdpConfig build()
build in class AuthUI.IdpConfig.Builder