Android: Files that I write to the sdcard do not show in Windows explorer, for Acer Iconiatab

Viewed 11804

In my application, I create files and write them to the Sdcard. My created files show properly in DDMS, and in windows explorer when I mount my Samsung Galaxy as a USB device. But, they do not show in Windows explorer on my Acer Iconia Tab A500, when it is connected by USB. I assume this is due to some difference in 3.0? Do I need to create my files differently in 3.0 so that they show in Windows by usb?

7 Answers

Thought I'd post a new answer, because the current accepted answer doesn't work for anything after KitKat.

File imageFile = ....

MediaScannerConnection.scanFile(this, new String[] { imageFile.getPath() }, new String[] { "image/jpeg" }, null);

Solution provided by darrenp here.

This may be from way out in left field. I am new to Android developing and was having the same problem: I save a file to the sd card, and I don't even SEE the ANDROID directory when I hook up my phone to my windows computer to look at the phone. On a whim, I went to Developer options (that thing you get by tapping the build number 7 times) to configure developer options and I turned "Developer options" off. I think somewhere in the mayhem I toggled "USB debugging" on and off as well. Had to do the seven taps thing again. Now I see the ANDROID directory and the files I saved under ANDROID/data/com.blahblah.blahblah/files. Go figure. Maybe a version of "reboot." Random, I know, but it worked for me ;-/

Related