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

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -