Information about the SD card location and state can be found with this class:
http://code.google.com/android/reference/android/os/Environment.html In current builds we have an android.os.StatFs class that can get available space information for mounted devices. This currently isn't public, and I'm not sure if it was there in M5. But we should probably make that public because it is certainly useful information to retrieve. On Jun 5, 2:37 am, David Given <[EMAIL PROTECTED]> wrote: > Mark Murphy wrote: > > [...] > > > > For that matter, are there any rules as to how > >> an application should use SD card space? > > > You'll need a Googler to answer strictly about "rules". > > > That being said, I recommend you consider the SD card contents to really > > be the user's prerogative in terms of layout and contents as much as > > possible. Some might have an SD card populated from some other device > > that they're bringing over (e.g., loaded up with MP3s). It's also quite > > possible that they'll be sharing the SD card with other devices. Hence, > > the less intrusive you are on how the SD card can be used overall, the > > happier users will be. So, for example, forcing MP3s to fit in some > > specific directory structure because it's convenient for you might not > > be convenient for the user. > > What I need is a biggish cache for downloaded data --- hundreds of > megabytes, and so won't fit on internal storage. It's not intended to be > user-accessible. I note that Android puts a /android directory on SD > cards containing the MediaStore database; it would be nice if there was > an API for finding this directory and letting applications put stuff > there... > > Of course, I still need a way of finding out how much free disk space > there is first, to make this all work properly. It appears Java can't do > this! There's an 11-year old bug on Sun's website asking for this > ability. Apparently it'll be in Java 6... > > -- > ┌─── dg@cowlark.com ─────http://www.cowlark.com───── > │ "I have always wished for my computer to be as easy to use as my > │ telephone; my wish has come true because I can no longer figure out > │ how to use my telephone." --- Bjarne Stroustrup > > signature.asc > 1KDownload --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

