Get Android Google Account

You can get the android google account from a device using the AccountManager like this:

Account[] accounts = AccountManager.get(this).getAccounts();
for (Account account : accounts) {
// TODO: Check possibleEmail against an email regex or treat
// as an email address only for certain account.type values.
String possibleEmail =;


You might want to check on account.type to match “” since many other synchronisation accounts exists on a regular device. Think of facebook and weather synchronisation.

Also this requires the GET_ACCOUNTS permission set to your manifest:


Leave a Reply

Your email address will not be published. Required fields are marked *

Please reload

Please Wait