I have a Xamarin forms app running on a MEMOR 10 external storage, it scans barcodes and writes the data to a .csv file stored in a folder in external public storage. There’s no issue with reading or writing the file from the android side. The issue is when I connect the device to a PC vis USB the file is not visible unless I reboot the device. I don’t have this problem when I run the app on any other android device. Any suggestions?
The behavior you described is be due to a known bug of the Windows Driver for the Android MTP protocol, which doesn’t keep his internal database correctly synchronized with the Android File system changes. It works correctly with Linux machines but not with Ms Windows.
On Memor 10 a fix for the defect has been included with the release of the latest Android 9 images.
The advice we give is to update the device’s FW to the latest version available (to date Memor 10 Android 9.0 v2.08.12).
However, in case the update to a new version of the operating system is not a viable solution for you, we refer to this post where we discussed the issue in deep, and we suggested 3 different methods to Programmatically force Android MTP database refresh if file in storage changed and 4 methods to manually force the refresh.
Mobile Products L3 Specialist SW Engineer