android - AccountManager.newChooseAccountIntent 不要求创建帐户
问题描述
我希望用户从我的 Android 应用程序中选择一个现有帐户。我在用着
Intent googlePicker = AccountManager
.newChooseAccountIntent(null, null, new String[]{GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE},
true, null, null, null, null);
a.startActivityForResult(googlePicker, ACCOUNT_REQUEST_CODE);
但我在文档中找不到避免请求创建新帐户的方法。有没有可能实现?
解决方案
你需要谷歌登录:
首先访问以下链接:
https://developers.google.com/identity/sign-in/android/start-integrating
然后按照本教程进行操作:
推荐阅读
- firebase - Firestore.settings() 要求它的第一个参数是对象类型,但它是一个自定义对象
- powershell - 带有 Try...Catch 的 Powershell 函数没有进入函数,因为参数会导致错误
- python - 如何根据nan索引值合并行
- c++ - Qt QSpinBox 加速步长
- angularjs - Restrict kendo-date-picker to months and years
- json - Accessing JSON data in Angular application (Multiple nested arrays)
- python - 使用两个静态校准相机测量真实物体
- go - 如何使用 sqlx 更新多行?
- android - 为什么getRootInActiveWindow()在尝试获取短信窗口时返回null
- python - 两个版本的python的问题