Well... you can make a temp file wherever you want. Depending on what you want to do, either the SD card or your own internal data directory would make sense. The trade-offs are:
(1) The internal data directory is secure, so if you are putting ANY private information (passwords, mail messages, chat data, etc) in the temp file you should put it in internal storage. (2) The SD card generally has a lot more storage available, so if you are going to be writing multiple megabytes of data then the SD card is a better choice. (3) The SD card may not be available... but in that state the camera can't take pictures, etc, so it should be unlikely. On Oct 3, 5:12 pm, Jason Proctor <[EMAIL PROTECTED]> wrote: > hi justin, > > thanks for the response. > > supposing i'm running on a real device and the user doesn't have an > SD card. then what? > > thanks, > j > > >You should put temporary files somewhere in /sdcard, as generally this > >will have more available space than a device's internal storage. For > >this to work you need to use emulator options to specify an sdcard > >image that was created with the mksdcard utility. > > >You're getting the error you're getting because /sdcard doesn't exist > >since you haven't specified an sdcard image file. > > >Cheers, > >Justin > >Android Team @ Google > > >On Oct 3, 3:02 pm, Jason Proctor <[EMAIL PROTECTED]> wrote: > >> is there a good spot in the filesystem to park temporary files? > > >> i notice from rummaging around that there is no /tmp on this Linux > >> box, and File.getTempFile() fails, with the error "can't create > >> /sdcard/$filename". > > >> (and android error messages should be more informative in general, IMHO.) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

