tags:

views:

107

answers:

1

hi,

what is the Android Email content uri. form the Email Client source code i get the following Uri

content://com.android.email.provider/body
content://com.android.email.provider/message
content://com.android.email.provider/syncedMessage
content://com.android.email.provider/deletedMessage
content://com.android.email.provider/updatedMessage
content://com.android.email.provider/account
content://com.android.email.provider/accountIdAddToField
content://com.android.email.provider/attachment
content://com.android.email.provider/attachment/message
content://com.android.email.provider/mailbox
content://com.android.email.provider/mailboxIdAddToField
content://com.android.email.provider/hostauth

but not returning cursor when i run the following code.

Uri uri = Uri.parse("content://com.android.email.provider/account");
Cursor cursor = mContext.getContentResolver().query(uri, null, null,null,null);

anyone no how i can access email contents?

Thanks.

A: 

anyone no how i can access email contents?

The Email program is not part of the SDK. It can be replaced on Android devices. The content providers can change in future versions of Android. The user might not be using that email program in the first place, using Gmail, K-9, or another third party application.

CommonsWare
dear you are right. And there is also no proper implementation define in the Email Client Content provider. Download the source code from the following link http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=summaryand check out the EmailProvider class present in the source code.
Kamran Omar