Use the GraphHopper Directions API with the Maplibre Navigation SDK for Android.
With this SDK you can implement turn-by-turn navigation in your own Android app while using GraphHopper for the routing and a map tile service like MapTiler for the map visualization.
- download IntelliJ with Android Support and open this repository
- go to app/src/main/res/value/developer-config.xml and..
- replace the GraphHopper API key to make the routing working (do not forget to prefix the GraphHopper API key with
pk.
) - replace the map tiles API URL to make the map visible
- enable GPS location
- start the app and click "Navigation UI"
- you will see a gray circle for your current location. Tap on screen to set the destination
- Now a button "Start Route" will appear. Click it and the navigation panel will appear
To find the old example that uses the old GraphHopper SDK have a look here.
This code was forked from Maplibre. It stands under the same license as the Maplibre SDK, i.e. MIT License.