mapbox / mapbox/mapbox-navigation-android

Remove `language` from audio guidance api constructors

Open
#4,686 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The language is passed to audio guidance api classes. But the language is determined at the time of a route request. This means the voiceLanguage is available from the The DirectionsRoute.voiceLanguage()

We should be able to remove the language from the audio guidance classes, and then they will not have to be reconstructed when the language changes. Here are some references for where language is passed through the constructor but should get them from the VoiceInstructions or the DirectionsRoute

  1. MapboxSpeechApi
  2. MapboxSpeechProvider
  3. MapboxVoiceInstructionsPlayer
  4. VoiceInstructionsFilePlayer

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 MapboxSpeechApi.kt, MapboxSpeechProvider.kt, MapboxVoiceInstructionsPlayer.kt, and VoiceInstructionsFilePlayer.kt, then trace the VoiceInstructions and DirectionsRoute.voiceLanguage() references described in the issue. Remove language from the audio guidance constructors and use the route or voice-instruction language instead; done means language changes no longer require reconstructing these classes.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.