> From what I've been able to find, Android apps are sandboxed, and can
> only list, read, and write files within the application's data
> directory (e.g. /data/data/<pkgname>).
>
> ...but, what about an application that allows users to view photos on
> an SD card (or play music, etc)?  Surely this must be possible. Does
> one have to write a Service Provider for this?

All applications can read and write on the SD card, though starting in 1.6
you need to hold a suitable permission (e.g., WRITE_EXTERNAL_STORAGE). Use
Environment.getExternalStorageDirectory() to get a File object pointing to
the root of the SD card.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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