Download manager

by davidyu » Mon, 04 May 2009 14:02:30 GMT


Sponsored Links
 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?
--~--~---------~--~----~------------~-------~--~----~



Download manager

by ondraz » Fri, 12 Jun 2009 11:45:59 GMT


 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



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Download manager

by Hod » Fri, 17 Jul 2009 01:53:32 GMT


 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





--~--~---------~--~----~------------~-------~--~----~



Download manager

by Hod » Fri, 17 Jul 2009 01:53:55 GMT


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

Basically, only an application signed with the same certificate as the
Download Manager application, or one installed on the /system
partition can be granted that permission.  Just putting in a "uses"
clause in your manifest isn't enough.  To try the /system route, do

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

Hod





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. content observer for calllog works on 1.6 but fails on 2.0

Dear all,

I am working on a app that can monitor the change in call log and
delete specific call history if it exists. The goal is to be able to
never show call history with some contacts.

It uses a ContentObserver to observe the change in CallLog.Calls. When
onChange() gets called, it will do a contentResolver.delete(...) to
remove history with some contacts. The code is below.

The problem I have now is that it works fine on 1.5, 1.6 but fails on
2.0,2.1.

On 2.0, after making a call, the phone will turn to calllog view
automaticlly, and then my observer is called forever.... I mean it's
continuously getting called, thousands of times, until I manually
uninstall it...

Could anyone help me with this? Why it happens and how should I fix
it?

Thank you!!

Code for adding observer:

                ContentResolver cr = getContentResolver();
                CallObserver co = new CallObserver( mHandler );
                cr.registerContentObserver( CallLog.Calls.CONTENT_URI, true, co 
);

Here is the code for CallObserver

        private class CallObserver extends ContentObserver{
                public CallObserver(Handler h){
                        super(h);
                }
                @Override
                public void  onChange(boolean b){
                                Log.w("Carrot", "called onChange");
                                some_delete_calllog_function();
                }
        }

-- 

2. EventListenerList in Android

Hello,
I want to import a java project into Android. But I figured out that
this project is using an EventListenerList, which is part of swing and
so not available in Android. Does anybody of you have an idea how to
transform that into some Android-valid code and still have the
opportunity that everything is syncronized as it should be?

Thanks a lot.
Regards

-- 

3. colud i join Android Developers group?

4. Getting access to audio data during a phone call

5. Bluetooth connection : pairing before connecting ?

6. Can anyone tell me if Donut support WPA2-EAP ?

7. build camera app from platform/packages/apps/Camera.git