code: public static List<String> getAccountEmails(Context context) {
          
          final Set<String> emailSet = new HashSet<String>();
          final Account[] accounts = AccountManager.get(context).getAccounts();
  
          for (Account account : accounts) {
              if (isEmail(account.name)) {
                emailSet.add(account.name);
              }
          }
  
          return new ArrayList<String>(emailSet);
      }
docs: Retrieves a list of e-mails on the device
  
  @return A list of emails