Tuesday, August 31, 2010

[android-developers] Re: getting email address of the account on the phone

Account[] allAccounts =
AccountManager.get(getApplicationContext()).getAccounts();
for(Account account : allAccounts)
{
String emailAccName = account.name;
String emailAccType = account.type;
}

Dont forget to add
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
in the manifest

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate