Manually advancing the leg progress does not advance it

Open
#7,826 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin
Domain
mobile-dev

Research direction

Start by reproducing the report with the provided Kotlin snippet on Android API 21 using Mapbox Navigation SDK 2.19.1. Trace how setNavigationRoutes handles the supplied route list and leg index, then verify that changing the index advances currentLegProgress and the driver's instruction.

Written by the indexing model from the issue text.

Description

Android API: 21
Mapbox Navigation SDK version: 2.19.1

Steps to trigger behavior
val currentIndex = routeProgress?.currentLegProgress?.legIndex

navigation?.setNavigationRoutes(
  listOf(currentRoute), currentIndex?.plus(1) ?: 0
)

This has been confirmed via a debug point that none of the values are null and setNavigationRoutes is called with the first parameter being a list that only contains the current route and the second parameter being 1 with currentIndex being 0.

Expected behavior

The navigation should advance to the next leg.

Actual behavior

It stays at the same leg - no changes to the current instruction for the driver.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-navigation-android

All issues in mapbox/mapbox-navigation-android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.