storing android application data on SD Card

user121196 picture user121196 · Jul 30, 2009 · Viewed 87.8k times · Source

Is there a way to store android application data on the SD card instead of in the internal memory? I know how to transfer the application sqlite database from the internal memory to the SDCard, but what if the internal memory gets full in the first place? How does everyone handle this?

Answer

yincrash picture yincrash · Jan 17, 2010

It's better practice to use Environment.getExternalStorageDirectory() than to hard code "/sdcard" It's not always certain that the folder name will be called that. Also, the Environment class offers a getExternalStorageState() method to check on if the external storage is even available.