I'm trying to create a directory on my Android device using the following code:
// If directory doesn't exist, create it.
File fileDir = new File(Environment.getExternalStorageDirectory() , "MyApp");
if (!fileDir.isDirectory()) {
fileDir.mkdir();
}
I believe the directory is being created in /storage/emulated/0/
. How can I create it to be publicly viewable in the internal storage?
For example, when the phone is connected to my PC, it should be in Phone/MyApp
. Thanks!