Is the storage location "storage" for all Android devices and versions fixed? -
i want know :
/storage/sdcard0/
, /storage/sdcard1/
directory location android devices , versions available , unchanged? namely, can use /storage/...
in code?
i want sure root of versions available or not. !
for example :
file root = new file("/storage/sdcard1"); // or file root = new file("/storage/sdcard0"); // if unmounted , know .. //file[] files = root.listfiles(); //for(file singlfile: files){ // ... //}
is code correct? android mobile devices? help.
/storage/sdcard0/ , /storage/sdcard1/ directory location android devices , versions available , unchanged?
absolutely not. not same different users on same device.
never hardcode root paths. use methods on context
, environment
, etc., @ root paths.
Comments
Post a Comment