Home Tags About

Android: Get google account

20 Jan 2012
android
    AccountManager am = AccountManager.get(context);
    Account[] accounts = am.getAccountsByType("com.google");
    for(Account account : accounts) {
        Log.i("account name: ", account.name);
        Log.i("account type: ", account.type);
    }