java - A Safe Path to External Storage -


for app, have large database needs stored on user's device. plan change in future. now, however, i'd store user's external storage (if available) rather fill internal storage. method can use safe (meaning, work on devices) path external storage?

you root path store datas. think secure case.

string root = environment.getexternalstoragedirectory().tostring(); file dir = new file(root + "/your_folder"); dir.mkdirs(); dir.setreadonly(); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -