public static Account getAccount(final Context context) {
        final Account[] accounts = AccountManager.get(context)
                .getAccountsByType(ACCOUNT_TYPE);
        return accounts.length > 0 ? accounts[0] : null;
    }
Get configured account

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