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. Porting android to IMX31 Lite kit

Hello,

Has any one ported android to IMX31 Lite kit, please let me know the
steps to port or where can i get the information of porting android to
IMX31 litekit.

I got the linux kernel source from 
http://code.google.com/p/android/downloads/list
it supports IMX31ADS but not IMX31lite kit.

Thanks in advance,

Prashanth

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

2. yaffs2 and streams

My understanding is that the Android will be using the yaffs2 file
system.  Is that correct?

If so, I have a question about how it handles failed stream
operations.  I'm writing a small app that can potentially do a lot of
I/O using file streams.  On some environments, I've noticed that under
high CPU situations, the occasional stream operation fails:  for
example, a call to mystream.write(buffer, 10) might fail, or a call to
"mystream << buffer".

I know it fails because mystream.fail() returns true after the call.
However, what I don't know is the extent of the failure.  Did none of
the bytes make it through?  Or two bytes, or nine?

The errno is 0 and so far in my testing, none of the bytes make it
through.  However, I don't know if this is always the case thanks to
yaffs journaling, or whether this is just luck and partial output of
the stream is just rare but possible with my application.

Does anyone know if I can/should rely on the journaling to ensure that
none of the bytes in the failed call makes it through, or if I need to
put in some sort of rollback mechanism in my code to gaurantee this?

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

3. Wall Street Journal article today - are things going down the drain for independent developers?

4. Error in creation of new android project

5. How to play a VideoFile from Resourse Folder??

6. Show a (progress) dialog in the onClick event of an alert dialog

7. No display, was: Wall Street Journal article