mapbox / mapbox/mapbox-navigation-android

DistanceFormatter units cannot be changed after app launch

Open
#4,988 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Android API:
Mapbox Navigation SDK version: 2.1.0

We require a single instance of MapboxNavigation via MapboxNavigationProvider

This means that everything in NavigationOptions cannot change. One obvious consequence to this is that you cannot change the units, you must then restart the application to see the changes go into effect.

We had a similar issue with replay because we want to change the LocationEngine after initialization. The solution was to enable replay by session https://github.com/mapbox/mapbox-navigation-android/pull/4843

Adding an issue here to discuss how we should allow for more mutable options.

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.

Research direction

Start with MapboxNavigationProvider and NavigationOptions, then compare the session-based replay approach described in pull request 4843. Done would be an agreed design for changing units after initialization without restarting the application, including which options may become mutable.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.