Code example for AccountManager

Methods: addAccountExplicitly

0
		this(AccountManager.get(context), context.getPackageManager(), context
				.getString(R.string.account_type), context);
	} 
 
	public void addAccount(final String email, final String masterToken) {
		accountManager.addAccountExplicitly(new Account(email, type),
				masterToken, null);
	} 
 
	public Account findAccount(final String email) {
		final Account[] accounts = accountManager.getAccountsByType(type);
		for (final Account account : accounts) {
			if (account.name.equalsIgnoreCase(email)) {
				return account;
			} 
		} 
		return null; 
	} 
 
	public AndroidInfo getAndroidInfo(final String email) {
Connect your IDE to all the code out there  Get Codota for Java