Native Trail Router app for Android

Today marks the release date of a brand new Trail Router app for Android. This is a complete rewrite of the app and it's now fully native. In short, this means that users can expect a vastly improved user experience over the old app, alongside better battery life and an array of new features.

Android users can download the new app here.

Read on to discover more about the changes and how they were achieved.

Improvements and changes

  • Now fully native, using Mapbox GL, resulting in faster loading and smoother scrolling around the map.
  • Designed for operation with one hand - all navigation and options are at the bottom of the screen.
  • Preview cards of proposed routes, including a minature version of the map and the amount of greenery on the route.
  • A new 'Run mode' that places the device into full screen, blocks accidental taps on the screen and follows your location. This is deal when using the app to navigate whilst running.
  • Ability to export GPX/KML files directly to other Android apps.
  • Vastly improved battery life when using Trail Router on long runs.
  • Saving of your routing preferences between launches.
  • Automatic resumption of your route if the app is paused and later resumed.

A first look at the user interface

Screenshot 1 Left: The landing screen allows you to quickly find a 3 mile or 6 mile round trip route from your current location, or create a custom route. Right: A list of 3 mile round trip routes discovered in my area, including small preview maps of each and elevation indicators.

Screenshot 2 Left: Clicking on the first suggested 3 mile route loads the route up full screen. Right: Dragging the bottom screen up reveals further information about the route, including a full elevation profile. Users can also save their routes and enter 'Run mode'.

Screenshot 3 Left: Entering 'run mode' takes the route full screen, hides all menus/buttons and follows your location - perfect for preventing accidental presses whilst running. Right: The settings screen allows users to select different map styles (such as dark mode, ideal for running at night) and adjust their greenery and hill preferences.

A quick look under the hood

The new native Trail Router app is made possible thanks to Mapbox GL and - just as importantly - Mapbox's support of Trail Router.

Mapbox GL is a native Android SDK for delivering performant map-based applications. Trail Router uses Mapbox for all of the maps and geocoding (note that Trail Router does not use Mapbox for the routing - we do that using our own routing algorithms, which factor in greenery, provide round-trip routing and much more). The small preview maps are delivered using Mapbox's Static Image API.

I was initially very hesitant to embark upon porting Trail Router to Mapbox GL, particularly as it depended so heavily on Leaflet and I lack professional Android development experience, but it wasn't as much work as I expected. I'd encourage anyone looking at building a modern mobile application that requires mapping to take a good look at Mapbox.

I will publish a much more detailed blog post on how Trail Router makes use of Mapbox GL in the near future.

What about iPhone users?

An iPhone app is already available, but this is essentially just a thin wrapper around the Trail Router website (just like the earlier Android app).

A brand new, fully native iPhone app is in the very early stages of development right now. If you've got experience in iPhone development and would like to help out, please get in touch.

Closing thoughts on apps

When I first created Trail Router, I hesitated to create a mobile app version. This stems from my belief that the closed nature of the Android and iOS app ecosystems is a bad thing. To cede so much control to Google and Apple, and to be subject to their changing policies and whims, is a recipe for disaster for independent developers. My views on this remain unchanged.

Nonetheless, as an Android user and keen runner myself, I knew that a fully native Trail Router app was the only way to deliver a vastly better user experience, so I can live with this trade-off for now. I'm very pleased with the outcome and look forward to trying it out in foreign locations, once we're all able to travel again. And a big thank you once again to Mapbox for supporting Trail Router!