Assume a device running Marshmallow (API 23), my app uses
getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS)
and the path displayed on the device (in a user screen) is:
/storage/emulated/0/Android/data/<app>/files/Documents/<mydir>/<myfile>
and the user-created files exist in that directory.
When I go to Windows Explorer (with device connected as USB), I see:
<mount point>\Card\Android\data\<app>\files\Documents
and that directory is empty!
What I'm trying to accomplish seems simple enough:
Allow user to save a file which is then accessible via PC when connected as USB device, located in a consistent and intuitively obvious path (such as the noted mount point).
Yet, obviously there is a disconnect somewhere so I'm seeking help.
Just to add to the confusion, when running an emulator at API 19, the same function returns
/storage/sdcard/Android/data/<app>/files/Documents/<dir>/myfile.xml
Finally, it would be super if the expected behavior is the same no matter which device level - so, for example, documentation can be accurate as to what to expect on the device screen and on the Windows explorer.