Most of those addresses are maintained by email clients which don't have content providers to get at them.
If your goal is to use the address list to select the return address for an outgoing email, that doesn't fit the Android way of doing things. Your application should announce that it wants to send an email by throwing out a properly-outfitted ACTION_SEND
intent. Whatever application ultimately services it may give the user a choice about which account and return address to use in sending it.
Addendum:
The default email client has a content provider called content://com.android.email.provider/account
that you shouldn't or can't use because:
- It's undocumented.
- Its manifest requires that apps wanting to use it have the
com.android.email.permission.ACCESS_PROVIDER
permission.
- That permission has a
protectionLevel
of signatureOrSystem
, which restricts grants to apps stored in the system image or signed with the same key as those in the system image. Your application is unlikely to fall into either of those categories.
Other things to be aware of:
- There is no guarantee that a given device will have support for email.
- Email on a device may be serviced by a third-party email client (e.g., K9, SEVEN, Touchdown, MailDroid or others) which maintains its own account database and likely doesn't expose it.