I've got the same problem. I wrote a widget that displays the last
emails on a homescreen. This worked quite well for Android 2.1, but
since 2.2 i cannot read the emails by using the ContentProvider
because of the strict security. I found out the reason for this is
that you an application with granted permission can access the
passwords of the email accounts.

So how can i access the emails, now?

Regards,
 Frank

On Oct 6, 8:39 pm, Priyank <[email protected]> wrote:
> Hi,
>
> I have my application which creates an audio file. I need to forward
> this file via Android Email app. But on calling the email intent, I
> get a permission denial.
>
> I am calling the email app like this:
>                 Uri  emailUri = 
> Uri.parse("content://com.android.email.provider/
> account");
>                 Cursor cursor = mCr.query(emailUri, null, null, null, null);
>
> I get an exception :
> java.lang.SecurityException: Permission Denial: reading
> com.android.email.provider.EmailProvider uri 
> content://com.android.email.provider/account
> from pid=1721, uid=10031 requires
> com.android.email.permission.ACCESS_PROVIDER
>
> I have set the email permission in my Manifest file:
> <uses-permission
> android:name="com.android.email.permission.ACCESS_PROVIDER"></uses-
> permission>
>
> When I am launching the app, I get this "Not granting access" message
> in the ddms logs:
> WARN/PackageManager(90): Not granting permission
> com.android.email.permission.ACCESS_PROVIDER to package
> com.mplayer.application (protectionLevel=3 flags=0xbe44)
>
> Can I not open the android email app from my application.
> I am working on Android 2.2
>
> Thanks,
> Priyank

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

Reply via email to