开发者

list google apps accounts

开发者 https://www.devze.com 2023-04-08 04:52 出处:网络
How can I determine if a specific google account is a 开发者_开发知识库Google Apps account? I have 2 accounts on my phone.

How can I determine if a specific google account is a 开发者_开发知识库Google Apps account?

I have 2 accounts on my phone.

a normal Google acc and a Google Apps account

accountManager = AccountManager.get(getApplicationContext());
Account[] accounts = accountManager.getAccounts();
for ( int i = 0; i < accounts.length; i++ )
{
    Log.d(TAG, accounts[i].name + " - " + accounts[i].type);            
}

It prints "com.google" as type for both.


I was wondering too, but determine based on @gmail.com or @googlemail.com as many suggested isn't accountable. Through some entrances, users can actually register a Google Account using emails other than Gmail. Try this sign-up entrance: https://accounts.google.com/newaccount?hl=en


AFAIK account.name contains email, right?

Google account (aka gmail) email address contains @gmail.com or @googlemail.com. Google Apps account always have custom domains. This way you can distinguish them.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号