views:

198

answers:

3

Are there any guidelines where should my app store resource files downloaded from internet?

A: 

I don't believe there are any particular guidelines published, but it's a good idea to create a dedicated directory for your application, rather than dumping everything in the root of the SD card.

Christopher
+4  A: 

Here is an advice gleaned from the android developers forum:

There are two fairly common and well defined situations:

Situation: You need a temp file to do some processing that won't necessarily fit into memory.

Solution: Create the file, use it, delete it when you're done* Caveat: The file may be exceptionally large: demand an SDCard. The file contains sensitive information: use app storage.

Situation: You are operating a cache.

Solution: maintain the files in the supplied cache directory (Context.getCacheDir()), the system knows these can be deleted** Caveat: Big ticket items (like songs and videos) go to the sdcard (the user can treat these types as useful files anyway)

Jacques René Mesrine
+2  A: 

For future reference, now there are published guidelines: http://developer.android.com/guide/topics/data/data-storage.html

Edi
Accepted answer changed
tomash