Using BRouter on Android with OsmAnd

BRouter integration in OsmAnd changed a lot during the summer of 2019. This guide assumes you are using the BRouter Android app in version 1.5.0 or higher as well as OsmAnd in version 3.4 or higher.

Installing BRouter app on your Android device

First, install the BRouter app on your Android device from F-Droid or Google Play Store. You can also build the BRouter Android app yourself.

Get it on F-Droid Get it on Google Play

Downloading BRouter segments

Then, launch the BRouter app and choose “Download Manager”. Zoom in and select the areas you want to route in. Then click “Start Download” and BRouter will start downloading the segments files for the selected areas.

Main menu of BRouter android app

Grid selection of segments to download

Note that you will have to repeat this step periodically, whenever you want to have an updated version of the OSM data used for the routing.

Selecting profiles to use

Once this is done, start again the BRouter app and choose the “BRouter App” entry on the main menu. Select the routing profile you want to use and click “Server-Mode”. Then, tick the boxes for the routing modes you want to use this profile for. You can use two different profiles per transportation mode, which will be mapped to the “shortest” and “fastest” presets (these are just labelling) in OsmAnd.

Profiles selection

Profiles selection summary

Configure OsmAnd to make use of BRouter offline navigation

You can now create an “Application profile” in OsmAnd which will be using BRouter for offline routing. Go to Settings -> Application profiles -> Add and create a new profile based on the base profile of your choice (cycling here, for bicycle routing), with a custom name of your choice (“BRouter” on the screenshot below) and making use of “BRouter (offline)” for navigation.

BRouter configuration in OsmAnd application profiles

The BRouter app should be launched before OsmAnd for this specific entry to appear in OsmAnd. Therefore, if you cannot find “BRouter (offline)” navigation option, you should force quit OsmAnd and restart it.

OsmAnd version 4.7.1

From version 4.7.1 upwards Osmand supports the profile parameter for mapping: Since Osmand version 3, many profiles can be defined in Osmand and the user can easily switch between these profiles. This allow now when using the service-interface to address different brouter-profiles in a more flexible and better comprehensive way.

  • If in Osmand a profile has “BRouter” defined as navigation service
  • AND the profile-name looks like “Brouter[mysting]

==> then the profile “mystring” will be used in the Brouter-app! (this new mapping replaces in that case the basic mapping defined above and based on the file “serviceconfig.dat)

Examples: Osmand-profile name Brouter-app

[Brouter[trekking]	"trekking" profile will be used (file trekking.brf)
[Brouter[racebike]	"racebike" profile will be used (file racebike.brf)
....

Remark: Currently Osmand do not check the defined name (case sensitiv) for the Brouter-profile (mystring). If no profile is found, the routing will fail with “Could not calculate route..”!

BRouter configuration in OsmAnd application profiles