How to store large amount of data
The internal storage of an android device is very limited, so if your application downloads or somehow generates a large amount of data to store, you should save it on the external storage, the sd card. Even 1mb of data takes much space compared to the whole internal capacity on most of the current devices. The sd card has a bigger magnitude, and it is even expandable.
Even when storing data on the sd card you should limit the space your application can use up. For example if you cache images for an application you should track the usage the images and when the sum size of them exceeds a given limit, delete the the oldest used one.
When developing for API Level 8 (2.2) the directory get by the getExternalFilesDir() method can be used for storing files. Files stored here will be automatically deleted when the application is uninstalled.
- getExternalFilesDir(null);
Below API Level 8 such dedicated directory is not available, only the sdcard directory can be queried by the getExternalStorageDirectory() method. It is recommended to store files in the /Android/data/
Under 2.1 and below unfortunately all data created on the external storage will remain there, and there is not even a way for an app to run code on its own uninstall and do a cleaunup manually.
New tutorials from Helloandroid
Recent Apps
Android on Twitter
-
@Idevicegazette (iDevice Gazette)
GSM-to-Skype bridge lets you lose those roaming fees http://bit.ly/lbRJeh #android
11 years 45 weeks ago -
@tommy_banane (tom b.)
RT @AndroidFavorite: #Android New Desktop Android Market Is Live, Adds Several New Features http://zorr0.nl/lFwXNz
11 years 45 weeks ago -
@dwilliams5 (Dennis Williams)
just completed a runtastic run of 3.02 km in 40 min 11 s with #runtastic #Android App: http://tinyurl.com/5tvrpe3
11 years 45 weeks ago -
@S_Pinz (Spinz!)
RT @Androidheadline: Out of box #LG Optimus 3D got Quadrant 2420 score. Thanks @blink_c #io2011 #android http://twitpic.com/4whkdz
11 years 45 weeks ago -
@tayaitapps (Taya IT)
Next Google TV Looks A Lot Like Android http://t.co/dvlTim3 via @alleyinsider #google #apple #android #tv #honeycomb
11 years 45 weeks ago
Poll
Useful resources
Android Development Projects
- iOS/Android Developer to take older Games and bring them Current
- Android apps developer - need to finish urgent.
- Buliding MobileApp For onlie order
- looking for android APP developers
- Create an ecommerce app
- text-to voice for smartphones IOS - GOOGLE - HARMONY - AND ALEXA
- Optimize Images on App
- Create small feature with drag-drop text for Android
- Scouting for advanced website and Mobile apps developers. Potential Long-term contract.
- BLACK SCREEN