im building an android app and i need to save some files locally on the SD card. The question i want to ask is that does the android OS clear the app cache
mnt/sdcard/Android/data/app_name/cache/*
get cleared after the app is closed by the os due to lack of memory ( sigkill sent) ?
In what conditions or when is the cache cleared. If the app needs to save some file safely where should it store them?
It should not be cleared in that case.
Definitely when the user elects to clear it, or when the app is uninstalled. The external cache directory is not automatically cleared due to low storage conditions.
That depends on your definition of “safely”.