As I understand it you are supposed to notify the media database of any new files you add using http://developer.android.com/reference/android/media/MediaScannerConnection.html. Android itself will only update the media database automatically on boot.
/Johan Den torsdag 13 augusti 2015 kl. 01:09:03 UTC+2 skrev RLScott: > 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.

