gimportexportdevs / gimporter

Garmin Connect App to import GPX and FIT files
Apache License 2.0
25 stars 11 forks source link

Progress Bar #13

Open fm-sys opened 1 year ago

fm-sys commented 1 year ago

When transferring a larger track it would be nice to see the progress... Might require changes at the companion app first.

I would like to take a look at this.

Reason behind this feature request: when importing larger tracks >50km it sometimes takes minutes until transfer is done, and I would really like to know whether download is stuck or still ongoing.

fm-sys commented 1 year ago

What I have found out so far: Download process callbacks should be supported, however only for media files. However I haven't found a documentation about what Garmin considers as media.

:fileDownloadProgressCallback — (Lang.Method) — a callback method which must accept two parameters

  • totalBytesTransferred: The total number of bytes transferred for the current file download

  • fileSize: The size of the file being downloaded. Note that this can be null if file size cannot be determined from the server.

  • This option is only supported for media file download progress

  • This option is supported since CIQ 3.2.0

https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html#makeWebRequest-instance_function

I tried to implement this, however it seems the callback isn't called at all.

@haraldh Any idea how we could work around of this?

grafik

haraldh commented 1 year ago

No idea... ask garmin to finally extend their API and make FIT file download a 1st class citizen :smile:

fm-sys commented 1 year ago

I've opened a ticket in the developer forum, let's see...

https://forums.garmin.com/developer/connect-iq/i/bug-reports/download-progress-for-fit-gpx-downloads