Java tutorial
//package com.java2s; import android.accounts.Account; import android.text.TextUtils; import android.util.Patterns; public class Main { public static boolean doesAccountHaveEmail(Account account) { if (account == null || TextUtils.isEmpty(account.name)) { return false; } return Patterns.EMAIL_ADDRESS.matcher(account.name).matches(); } }