oh yes it should :-)

ok so maybe the unconventional Android application lifecycle changes 
the game a bit wrt temporary files, in the sense that "system 
startup" (etc), with accompanying cleanup, doesn't happen that often.

but still, trusting those applications to keep track of their 
temporary files is a bit naive, especially since application, er, 
termination may happen unexpectedly. but then if Android has some way 
of associating files with applications, via that unique 
application/user ID thing (if i'm reading it right), then anything 
created by File.createTempFile() could be deleted when the associated 
process "exits".

and none of this changes the fact that File.createTempFile() should 
create a writable temporary file whether or not an sdcard is inserted 
or not. createTempFile() has some handy benefits including ensuring 
uniqueness, be a shame to lose that. that's the deal with 
createTempFile(), and bugging out breaks the contract.

if in doubt, have a convention. that way there will be at least a 
little organisation in the chaos that will be Android.

tx


>No it shouldn't. :)
>
>Temp directories suck.  When do you remove those files?  If it's on
>the SD card, who owns them?  Especially with a limited out of storage
>space, it's just a big nasty mess that is best to avoid.
>
>So you can make your own temp files, and if you want them in internal
>flash then you have to put them in your own directory, where the
>system can appropriately bill them against your use of storage.  And
>you can decide when to delete them, when you are done with them.


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