private static Account[] getAccounts(final AccountManager manager)
            throws OperationCanceledException, AuthenticatorException,
            IOException {
        final AccountManagerFuture<Account[]> future = manager
                .getAccountsByTypeAndFeatures(ACCOUNT_TYPE, null, null, null);
        final Account[] accounts = future.getResult();
        if (accounts != null && accounts.length > 0) {
            return getPasswordAccessibleAccounts(manager, accounts);
        } else {
            return new Account[0];
        }
    }
Get configured account

@param context
@return account or null if none
app/src/main/java/com/github/pockethub/android/accounts/AccountUtils.java