Navigation with Maps

Posted on
  • Hey there,

    I was really looking forward to that feature, since I bicycle a lot in traffic and I can miss the navigation voice telling me where to go. Looking at the wiki, that's not implemented yet, I can't find a way to make it, probably due to changes missing in the android app. Just wanted to know if its still being worked on.

  • Yes, sorry about that, it's been something I have really been missing, and it's no my todo list but other things keep jumping in ahead.

    Basically I had a fork of Gadgetbridge which did it but in order to push the navigation images it changes some things I wasn't happy pushing back into the main repo immediately - but then it seems a lot of the message handling in Gadgetbridge got refactored and that broke all my changes - the same notification from Google maps got given a different ID every time it updated :(

    I was hoping we might have some success with­etbridge/issues/2387 but while I thought that hooked into an OSMAnd API I think it actually required a special OSMAnd build - and it's not like many folks use that for navigation anyway!

    My current plan is just to add some code to parse the Google Maps notifications inside Gadgetbridge and pull out the needed information, then to push that to the Bangle. It should be relatively inoffensive and easy to contribute to Gadgetbridge - although it's likely to need contributions from non-english speaking countries to ensure it can parse the data correctly.

  • Actually that gadgetbridge OSMAnd branch should use the OSMAnd api, but they didn't like the binary distribution of it so they copied only the code they needed instead of using the library (there might be a point in that as it's 2MB)
    That library is an external OSMAnd library and should be relatively stable as all OSMAnd plugins rely on it and it works with the standard OSMAnd version.

  • Ahh, interesting thanks! I didn't realise that was why - I wonder whether OSMAnd could slim down the API at all...

    I have just released a new Gadgetbridge on the Play store (as long as you've enabled testing at and that has the Google Maps parser in.

    If you update your Bangle.js apps (Android and Messages UI) you should now find navigation works.

    Working out the directions is a little fraught as the only thing we can do is to look at the picture, so right now it only does straight, left and right - but if someone goes for a drive with navigation on and Gadgetbridge set to log to a file, it should be possible to dig out the other images it doesn't recognise and I can fix those up - I just haven't had a chance yet.

  • I think their pebble integration still works, that basically sends their voice output as pebble intents, so I guess that could still be used:­/2d3fe242aed291233ccda9bcf091230dc0ccf11­e/OsmAnd/src/net/osmand/plus/voice/JsTts­

    That kind of works but only shows the route changes, what I did was make an small app with the OSMAnd api that converts the route updates to intents to be sent to the watch, so I can display the distance to the next turn + the one after that on the watch and buzz when the turn is imminent. This works quite ok for walking and biking, only seems to loose connection to OSM when you stand still for a while so you need to restart the app.

  • I have used the OsmAnd Pebble Integration by just filtering normal notifications in GadgetBridge. Watch buzzes with a new message whenever Osmand would have done some voice output. That worked well enough for walking around in areas with street name signs and when I had at least an rough idea of my route it even worked fine for biking. Normal OsmAnd notifications on the Bangle are completely useless as they are updated much too often (a notification every few meters).

  • I've been testing this out and there's a pretty big issue with how maps is sending the distance values when using imperial units.

    It will send the distance value to bangle.js in meters, which it's supposed to, until it gets to 0.1 miles at which point maps decides to send the distance value directly in feet instead.

    Now when the locale file on the bangle.js sees this new value in feet it still thinks it's working with meters and the distance becomes inaccurate as a result.

    I've tried getting the log data from gadgetbridge while using navigation, but it only showed one single nav message at the beginning of my drive with a distance of 0 and that's it. The navigation ran the whole trip on my phone and the watch so I don't know why there weren't more.

    I was also testing some formatting changes in the locale file to make it use one decimal place at less than 10 miles and convert to feet when less than 0.1 miles (this is about ~500ft or 152.4 meters which is when maps changes from miles to feet). This works great and makes the distances match exactly what is shown on the phone (except the bug with the units switching), but I'm thinking this may not be the right place for this code. Perhaps it would be better placed in the messagegui app and could be made compatible with all locales?

    distance: (n) => {
      var miles = n / 1609.34;
      var dp = miles < 10 ? (miles % 1 === 0 ? 1 : 2) : 0;
      return n < 152.4 ? Math.round(n * 3.28084) + "ft" : round(miles, dp) + "mi";
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Navigation with Maps

Posted by Avatar for Poolitzer @Poolitzer