Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I use android to write a file that is immediately accessible from a connected Windows PC
    text
    copied!<p>I am creating a zip file <a href="http://www.jondev.net/articles/Zipping_Files_with_Android_%28Programmatically%29" rel="nofollow" title="like this">like this</a> on an micro-SD card (FAT-32) connected to an android device (Motorola Xoom MZ601, Android 4.0.3) .</p> <p>When I use USB to connect the device to a Windows PC in "media device" mode I find that my newly created files are not displayed in Windows Explorer.</p> <p>Things that do not work:</p> <ul> <li>Refreshing Windows Explorer (F5).</li> <li>Physically disconnecting then reconnecting the USB cable.</li> <li>Broadcasting a <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_SCAN_FILE" rel="nofollow"><code>Intent.ACTION_MEDIA_SCANNER_SCAN_FILE</code></a> for the new file.</li> <li><a href="http://developer.android.com/reference/java/io/File.html#canRead%28%29" rel="nofollow"><code>File.canRead()</code></a> and <a href="http://developer.android.com/reference/java/io/File.html#canWrite%28%29" rel="nofollow">.canWrite()</a> return true, while <a href="http://developer.android.com/reference/java/io/File.html#setWritable%28boolean,%20boolean%29" rel="nofollow"><code>File.setReadable(true,false)</code></a> is returning false.</li> </ul> <p>Things that do work:</p> <ul> <li>Power cycling the device</li> <li>Removing the SD card from the device then using an SD-USB adapter to connect it to the PC.</li> </ul> <p>I would like for users to be able to plug the device directly into the PC for immediate access to their files, without needing to shut down and/or pull the card out.</p> <p>Any advice on achieving this goal?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload