如何使用 Gmail 凭据登录 Android 应用程序。谁能给我提供描述整个集成过程的教程链接。任何人都可以分享gmail集成的任何示例代码以登录android App。
问问题
1246 次
2 回答
0
您只需将此代码添加到您的 loginActivity:
List<String> googleAccounts = new ArrayList<String>();
Account[] accounts = AccountManager.get(this).getAccounts();
for (Account account : accounts) {
if (account.type.equals("com.google")) {
googleAccounts.add(account.name);
}
}
归功于臭氧的原始答案
于 2013-03-13T11:04:45.793 回答