作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我通过电话进行 Firebase 身份验证的代码是:
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setAvailableProviders(
Collections.singletonList(newAuthUI.IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER).build()))
.build(), RC_SIGN_IN);
默认国家代码是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/
我是一名优秀的程序员,十分优秀!