android.permission.ACCESS_DOWNLOAD_MANAGER has protection level
signatureOrSystem.  You can read about that at
http://developer.android.com/guide/topics/manifest/permission-element.html

Basically, only applications signed using the same certificate as
Download Manager or installed on the /system partition will be granted
that permission.  Just putting the "uses" clause in your manifest
isn't enough.  To try the /system approach, do

adb remount
adb push <your apk> /system/app

Hod

On Jun 11, 8:45 pm, ondraz <[email protected]> wrote:
> Hello,
>
> has anyone tried this? I got exactly the same error as davidyu. My
> application has permission android.permission.ACCESS_DOWNLOAD_MANAGER
> but download manager does not allow it to read downloads with the
> message that android.permission.ACCESS_DOWNLOAD_MANAGER is required.
>
> Ondra
>
> On May 4, 1:51 pm, davidyu <[email protected]> wrote:
>
>
>
> >    I want to access Download manager in my application, and set
> >    <uses-permission
> > android:name="android.permission.ACCESS_DOWNLOAD_MANAGER"/>
> >    <uses-permission
> > android:name="android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED"/>
> >    <uses-permission
> > android:name="android.permission.ACCESS_CACHE_FILESYSTEM"/>
> >    <uses-permission
> > android:name="android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS"/>
>
> >  in manifest.xml
>
> >   However, I still get /AndroidRuntime(14300): Caused by:
> > java.lang.SecurityException: Permission Denial: reading
> > com.android.providers.downloads.DownloadProvider uri
> > content://downloads/download from pid=14300, uid=10057 requires
> > android.permission.ACCESS_DOWNLOAD_MANAGER
> > E/AndroidRuntime(14300):        at android.os.Parcel.readException
> > (Parcel.java:1234)
> > E/AndroidRuntime(14300):        at
> > android.database.DatabaseUtils.readExceptionFromParcel
> > (DatabaseUtils.java:145)
> > E/AndroidRuntime(14300):        at
> > android.database.DatabaseUtils.readExceptionFromParcel
> > (DatabaseUtils.java:111)
> > E/AndroidRuntime(14300):        at
> > android.content.ContentProviderProxy.bulkQuery
> > (ContentProviderNative.java:279)
> > E/AndroidRuntime(14300):        at
> > android.content.ContentProviderProxy.query(ContentProviderNative.java:
> > 298)
> > E/AndroidRuntime(14300):        at
> > android.content.ContentResolver.query(ContentResolver.java:149)
> > E/AndroidRuntime(14300):        at
> > android.app.Activity.managedQuery(Activity.java:1499)
>
> > is there anything else I should do to access Download Manager?

--~--~---------~--~----~------------~-------~--~----~
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