androidgalaxy-nexus

Android Galaxy Nexus: can't see folder when connecting as Media Device (MTP)


An app I am debugging on an Android Galaxy Nexus creates a folder whose contents I want to inspect on my desktop. When I open a file browser app on the device, I can see the folder. However, when I connect to it from the desktop in the MTP mode, I can't see it. Nor can I see a copy of that folder that I create on the device using the file browser.

What can I do to make it visible from the desktop so that I could copy it over?


Solution

  • If this is a folder you created from code, you need to use MediaConnection.scanFile() to get it to show up in MTP. I have a blog post from last year that explains a bit more.