gpt4 book ai didi

安卓火力地堡 : Phone Authentication Custom Country Code

转载 作者:行者123 更新时间:2023-12-04 17:49:20 24 4
gpt4 key购买 nike

我通过电话进行 Firebase 身份验证的代码是:

startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setAvailableProviders(
Collections.singletonList(newAuthUI.IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER).build()))
.build(), RC_SIGN_IN);

结果是 Firebase auth. by phone

默认国家代码是1(美国)

我是否需要默认设置另一个国家代码(例如 244)?我该怎么做?

最佳答案

使用最新(我使用的是 4.3.1)版本的库,您可以在构建 IdpConfig 对象时直接设置默认参数

AuthUI.IdpConfig.PhoneBuilder()
.setDefaultCountryIso("IN")
.build()

Example input: {'+52', 'us'}

PS:不知道是什么时候第一次入库的

关于安卓火力地堡 : Phone Authentication Custom Country Code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46326796/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com