I am writing data to a file that I want to make available to the user via USB i.e. device is connected to PC and the user can pull the file from the device.
My device is a Google Nexus 5 which does not have an SD card. When I connect the Nexus to my PC I can see under Internal Storage the folder Android/data/'package'.
How can I create a directory for my package here?
I have tried using getExternalFilesDir and getExternalStoragePublicDirectory but they only store the data on a temporary emulated SD card that is not visible from the PC (but in Eclipse/DDMS). A similar case did not help.
Update 1 After rebooting my device I was able to see a file under /Android/data/'package'/file. It got there view getExternalFilesDir(null). When I write the data now, then I don't see the immediate update in the Explorer. Do I have to reboot all the time or is there a way to refresh the explorer?
Update 2 It seems that the files are there. I was able to run a SQLite database back up and restore without seeing the files in Windows Explorer. It is still interesting to know what is required so that they are visible without reboot.
Any idea is appreciated.
Mike