2011-06-28 60 views

回答

4

可以使用AccountManager用於在Android手機上檢查谷歌帳戶:

AccountManager am = AccountManager.get(getApplicationContext()); 
    Account[] accounts = am.getAccounts(); 

    for (Account account : accounts) { 
    //do something with account 
    } 
+0

當心這種方法需要GET_ACCOUNTS運行權限=> https://developer.android.com/reference/android/accounts/ AccountManager.html#getAccounts() –

相關問題