Hi,

This is an old known problem caused by caching associated the use of MTP 
protocol. MTP protocol is incredibly slow to enumerate directory entries so 
caching is used (both on the Android side & Windows side) but there is no 
way provided to 'refresh' the cache when you'd like to see your recent 
files.

You can make new files visible to the outside world if you use some other 
protocol to access the files on your Android device, eg using http over 
Wifi etc.

You can also check that the new files are present on the device itself by 
using some sort of File Manager app.

Regards

On Thursday, August 13, 2015 at 9:09:03 AM UTC+10, RLScott wrote:
>
> This is a new problem with Lollipop only.  My app writes to external 
> memory by building a file path name from:
>
>   Environment.getExternalStorageDirectory().getAbsolutePath()
>
> But when I plug the USB into a desktop computer, the new file does not 
> show up in Explorer.  If I reboot the Lollipop Android tablet and try it 
> again, the file now shows up in Explorer on the desktop computer.  
> Furthermore, if the file already existed, then the version of the file that 
> Explorer sees is the new updated version, just as it should be.  Brand new 
> files do not show up until a reboot of Android.
>
> Also, this was not a problem with KitKat.  New files written by my app 
> showed up immediately on the USB-connected computer.
>
> Is there some way, in my app, to force new files to appear immediately to 
> the outside world?  I am writing to the root of the external memory.  This 
> is a side-loaded app, not a Market app, if that makes any difference.  It 
> has been working perfectly for 3 years, until this problem with Lollipop.
>
> -Robert Scott
>  Hopkins, MN
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to