Mapbox-navigation-android: NullPointerException when using MapMatching Route

Created on 31 Jul 2018  路  3Comments  路  Source: mapbox/mapbox-navigation-android

Android API:
Mapbox Navigation SDK version: 0.16.0

Steps to trigger behavior

  1. Use MapMatching.builder() to generate a custom route
  2. Pass that route to navigation.startNavigation(route);
  3. App crashes with a NullPointerException

Expected behavior

MapMatching route is successfully passed to .startNavigation() and a turn-by-turn navigation session begins.

Actual behavior

Crash:
ekran resmi 2018-07-27 09 50 18

bug

All 3 comments

I had the same problem , I've added these two lines :

.voiceUnits("metric")
.language("fr-FR")

in my matching.builder and it worked

MapboxMapMatching.builder()
.accessToken(Mapbox.getAccessToken())
.coordinates(liste)
.steps(true)
.bannerInstructions(true)
.roundaboutExits(true)
.voiceInstructions(true)
.voiceUnits("metric")
.language("fr-FR")

.profile(DirectionsCriteria.PROFILE_WALKING)
.build()
.enqueueCall(new Callback() {

Hope this help

@vincent-caron
@riastrad

.voiceUnits("metric")
.language("fr-FR")

Thanks a lot for your help. It worked 馃憤

Noting here that updating the requests will fix this - but we are also addressing the internal crash with #1174.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jethromay picture jethromay  路  7Comments

shrutiWV picture shrutiWV  路  10Comments

zugaldia picture zugaldia  路  6Comments

Danny-James picture Danny-James  路  7Comments

karussell picture karussell  路  4Comments