labexp / osmtracker-android

GPS tracking tool for OpenStreetMap
GNU General Public License v3.0
503 stars 237 forks source link

OSM Tracker GPS Export broken #440

Closed 10992-osm closed 4 months ago

10992-osm commented 4 months ago

As far as I can tell, since updating to v2024.07.09, "Export as GPX" does not appear to work. At least, the files do not appear in their normal location (I haven't changed any settings), nor in any other obvious location.

(Android version 12)

jamescr commented 4 months ago

Android 10+ introduces scoped storage, the new normal location is Android/data/net.osmtracker/files/osmtracker.

vmeurisse commented 4 months ago

@jamescr The goal of the export gpx is to make the file available to the user. Saving in a folder private to the app forces user to use adb to retrieve the file, which is not very user friendly.

Note that even with Android 10, you can write to user visible folders. For example, here is how Newpipe is letting the user choose a folder to download videos: https://github.com/TeamNewPipe/NewPipe/blob/v0.27.1/app/src/main/java/org/schabi/newpipe/streams/io/StoredFileHelper.java#L474 https://github.com/TeamNewPipe/NewPipe/blob/v0.27.1/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java#L521

jamescr commented 4 months ago

The location where the file is exported is available without adb, you can use the file explorer an access the files in your phone.

But, I'll take a look to the code you share. Thanks.

mpawelski commented 3 months ago

The location where the file is exported is available without adb, you can use the file explorer an access the files in your phone.

It might be just me, but I don't see "Android/data/net.osmtracker/" folder when I connect my phone to PC. Even when I export db in app and get the message that the file is in "/storage/emulated/0/Android/data/net.osmtracker/my/export/path/OSMTracker.sqlitedb.gz". I still don't see "Android/data/net.osmtracker/" on PC when I connect the phone.

Export was working for me a month ago, so I guess it broke in "v2024.07.09". Now I really don't know how to get my saved tracks and media...

Anyway, I agree with @vmeurisse. Even if accessing "Android/data/net.osmtracker/" could be fixed, then still a possibility to export to user folder (not private app storage), would be much better UX.

In my case I was exporting GPX to some path that I share with syncthing so it automatically send the files to my PC. Great workflow, because I can just access folder on PC to see what new tracks I've recently recorded and exported, and use them to edit OSM. Now this workflow is broken.

BTW, thanks @jamescr for keeping this app alive!