saintbyte / openbmap

Automatically exported from code.google.com/p/openbmap
Other
1 stars 1 forks source link

Exported files are not visible over MTP until a media scan is performed #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Ensure "Keep uploaded files" is selected.
2. Create a log and export it.
3. Connect phone to your computer.

What is the expected output? What do you see instead?
I would expect to see the new log files, but they are missing. If I trigger a 
media scan (using Android's Developer Tools), all the files are there after the 
scan completes.

What version of the product are you using? On what operating system?
0.8.4 (downloaded from F-Droid), Cyanogenmod 11.0m11 (Android 4.4.4)

Please provide any additional information below.
This only affects MTP devices. My old Nexus S (which exposed its file system as 
USB mass storage) did not have this issue. I reported this as a bug in 
Cyanogenmod and was told that apps are expected to call 
MediaScannerConnection#scanFile 
http://developer.android.com/reference/android/media/MediaScannerConnection.html
#scanFile(java.lang.String, java.lang.String) after creating a new file. 
Apparently Radiobeacon is not doing this.

Original issue reported on code.google.com by mich...@vonglasow.com on 18 Feb 2015 at 6:08

GoogleCodeExporter commented 9 years ago
Really strange..

This might be an Cyanogen bug: in fact media scanner is called at 
https://code.google.com/p/openbmap/source/browse/android/src/org/openbmap/soapcl
ient/ExportSessionTask.java#367 and 
https://code.google.com/p/openbmap/source/browse/android/src/org/openbmap/utils/
MediaScanner.java#54

I just tested on a Paranoid Android 4.3 (Android core 4.4.2) device: there the 
track will appear immediately in MTP mode.

Original comment by wish7code on 18 Feb 2015 at 8:54

GoogleCodeExporter commented 9 years ago
Strange... I will check again next time I export a log and report back.

Original comment by mich...@vonglasow.com on 18 Feb 2015 at 9:30

GoogleCodeExporter commented 9 years ago
You were right... the issue I was experiencing had to do with my phone, which 
for some strange reason would show each folder twice over MTP, one copy being 
up to date and the other stale – and which one got chosen was kind of like a 
coin toss. I've now fixed the file system and the issue is gone. Within a few 
seconds the new files appear.

Original comment by mich...@vonglasow.com on 22 Feb 2015 at 4:38

GoogleCodeExporter commented 9 years ago
Thanks for the update..
I'm closing

Original comment by wish7code on 22 Feb 2015 at 7:00