首页 > 解决方案 > 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);

但我在文档中找不到避免请求创建新帐户的方法。有没有可能实现?

在此处输入图像描述

标签: androidaccountmanagergoogle-accountandroid-account

解决方案


你需要谷歌登录:

首先访问以下链接:

https://developers.google.com/identity/sign-in/android/start-integrating

然后按照本教程进行操作:

https://androidclarified.com/google-signin-android-example/


推荐阅读