How to get default email account information in android ..?

I am developing an application that requires auto-completion by default. The logical choice is to get the email address from the email client provided by the android. I searched for content providers and found nothing about the email client. How is this information stored? How can I contact him?

+4
source share
1 answer

Try the following:

AccountManager accManager = AccountManager.get(context); Account acc[] = accManager.getAccounts(); int accCount = acc.length; AppConstants.accOnDevice = new Vector<String>(); for(int i = 0; i < accCount; i++){ //Do your task here... } 

Resolution:

 <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
+2
source

All Articles