Im wondering how much data storage is available for my application in android?
I need to cache lots of files, and i was thinking to store it inside the sharedpreferences
What is the purpose of the caching you want to implement?
If you want to avoid downloading files from Internet multiple times, the SDCard or SQLiteDatabase
should be good options, depending on the type of the files, you are working with.
If you want to keep the files up in the memory (for example, you want to keep some decoded bitmaps in the heap), it will be best to implement your own Cache class.
SharedPreferences
can be used only with some basic types (boolean, int, String, long, float
) - so Parcelable
can't be put in your app's preferences.
This would pose a problem for saving files there.