Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when using MapMatching Route #1169

Closed
riastrad opened this issue Jul 31, 2018 · 3 comments · Fixed by #1174
Closed

NullPointerException when using MapMatching Route #1169

riastrad opened this issue Jul 31, 2018 · 3 comments · Fixed by #1174
Labels
bug Defect to be fixed.

Comments

@riastrad
Copy link

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

@vincent-caron
Copy link

vincent-caron commented Aug 1, 2018

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

@headbanggg
Copy link

headbanggg commented Aug 3, 2018

@vincent-caron
@riastrad

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

Thanks a lot for your help. It worked 👍

@danesfeder
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants