I have an app which at onCreate function, it creates a folder on the sd 
card. The code looks like this:

File externalStorage = Environment.getExternalStorageDirectory();
mExternalStorageLocation = externalStorage.getAbsolutePath();


File appDirectory = new File(mExternalStorageLocation + "myApp");
if(!logDirectory.exists()) {
   makeDirs(logDirectory);
}


Then in the app, there are data saved in that directory.


Once in while, I get report that that when this app is updated, or uninstalled 
and reinstalled, the files in that directory is lost. I am not sure what could 
cause this issue. Any ideas? What's the best practice for creating folders so 
it can be kept even if the app is uninstalled.

 Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/752d67c9-c5f5-4074-b82a-2621d013e099%40googlegroups.com.

Reply via email to