osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.47k stars 995 forks source link

Share to Garmin Connect #9258

Open switch87 opened 4 years ago

switch87 commented 4 years ago

I mostly follow the routes using my Garmin bike gps. To do this I have to save the route with Osmand, navigate to the Osmand directory in the file explorer and open the gpx with Garmin connect. This is a lot of work for something very simple, and it keeps a lot of other Garmin users from using Osmand.

I already asked Support why Garmin Connect is not available with the share button. I got the explanation it is due to Garmin not supporting but I never had any issue opening a Osmand gpx in Garmin, so in my opinion it should not be a problem to share it directly between the two aps.

vshcherb commented 4 years ago

I didn't find any API how to connect to Garmin bike gps. So, it's a good question how to do this

karlcz commented 1 year ago

I came across this old issue when searching on Garmin, and it still seems relevant.

I think the request is to have a flow for OsmAnd to create an intent to open the GPX file and let the Android system prompt the user to select a GPX-aware app. This is likely what is happening when the user finds the GPX file in the Android file explorer and tries to open it, where Garmin Connect is offered as an app choice.

It seems like Garmin Connect is not registered as being available for "shares" and so is not offered as a choice with the share button. What I found I had to do on my phone is use share to copy the GPX file to Google Drive, then browse the cloud location using the file explorer, and open there to get it into Garmin Connect. Since the default behavior is now to have an isolated app storage directory, the normal save flow does not make the GPX file visible to the file explorer...

Cargotourer commented 1 year ago

I support this request, having recently replaced my old Edge Touring with an Edge Explore 2, and having to learn about the connect app and workarounds to transfer a file. I finally have it setup so it sort of works with the export to folder and then opening it with connect. It is still a bit of a faff, though, and I'd certainly appreciate it if I could "share" with the Connect app directly.

Cargotourer commented 1 year ago

Come to think of it, maybe it isn't necessary to use the "share" API, if one could "merely" have the "NewFiles" (ingestion engine on th GPS) as a folder to export to when connected via bluetooth?

invy commented 1 year ago

Hello, I'm also interrested in the feature and I think it should be pretty easy to implement... Indeed I have a workaround, which is a bit tedious, but it's working:

  1. Create Route
  2. Share Route to Google Drive (or also a Messenger (telegram, whatsapp)
  3. From there get the gpx track and open it with Garmin Connect...

So basically Osmand should be able to "share to " or rather "open with" Garmin Connect to avoid the steps...

sonora commented 1 year ago

I may be mistaken, but from what I see, technicallly this issue needs to be adressed to Garmin, not OsmAnd:

Every app, upon installation, notifies the underlying OS (Android) about its capabilities to receive and handle content. And when OsmAnd (via "Share") offers a GPX file to be processed, the OS lists all installed apps which have announced they can handle that. So if Garmin is missing in this selection list I believe this can only be fixed in the Garmin app, not in OsmAnd. (Unless Garmin has registered for some other way to receive GPX files which OsmAnd is not aware of.)

invy commented 1 year ago

@sonora This could be valid point. The other option would be to try to export the Garmin .FIT files, which apparently contain not only points but also Turn-by-turn instructions. It would be interesting whether they'll register themselves for at least their own format.

switch87 commented 1 year ago

@sonora if you try to open or share the exported gpx flie from another app, it will prompt to open it in Garmin connect, so in this case it's definitely at the osmand side something is not going the right way.

Eather way, they should make sure to have an option to export to the apps from the major gps manufacturers. For the non tech-savy this lack is one of the main reasons to not use osmand. It's not a "nice to have" feature but something that has to be fixed. (As is the save that saves the files in an almost unreachable folder, but that's an totally different, although a little bit connected, issue. @vshcherb

sonora commented 1 year ago

We could research this thread: https://forums.garmin.com/apps-software/mobile-apps-web/f/garmin-connect-mobile-andriod/332336/download-a-file-from-android-share-intent

And the folder situation is connected to this problem: #16059 How does Garmin handle it?

invy commented 1 year ago

So, I think, the easiest way would be to add an Option "Open with", which I suppose is pretty trivial to implement :)

Cargotourer commented 1 year ago

I finally have learned enough about my Explore 2, Connect, and so on (I came from an Edge Touring), that I stumbled upon sort of a solution. This is hard to explain, so sorry for the wordiness:

Turns out that I can "Share with" an app called X-plore (it's a file manager) I already had on my Android. It says "X-plore" and underneath it says "Copy to".
I have then made a folder named "Ruter" (meaning routes in my language", and from there, I can open it up in my connect app. It's weird that the Xplore app can do this, but "My Files" cannot. My phone is running Android 13, and it is not rooted or anything of the kind.

Btw, I just realised there is another "Share" button in Osmand, where it isn't visible, but the one I use after having made a route is the one that pops up if you select "details" and it is then at the top of the screen. I tried to use the download (icon), but it's a horror show to me whether or not it selects the correct folder and if the file is then visible (probably me doing something wrong) But th "Share" and then choosing Xplore works every time.

Yes, it would be nice having a share with connect directly, but I placed a shortcut for the folder next to Connect, making it easy to find and use for me.

switch87 commented 1 year ago

@Cargotourer you don't do anything wrong with the download icon, it's just a horrorshow by design. The only folders you can select are inside the app folder, that is not meant to be accessed for system safety reasons.

I also work with your workaround. But to less technical friends I can't get this explained, so they end up not using Osmand.

Cargotourer commented 1 year ago

Thank you. I'm glad it is not me being exceptionally stupid with the "download" thing.

Tombstone2K commented 1 year ago

@Cargotourer This is what I have proposed in the other thread. If implemented it should resolve your issue and be easy for less technically inclined people -> https://github.com/osmandapp/OsmAnd/issues/16059#issuecomment-1621650332