mapbox / mapbox/mapbox-navigation-android

Setting muteVoiceGuidance(false) in OptionsBuilder does not unmute

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

Nobody has claimed this yet.

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

Description

Android API: 29
Mapbox Navigation SDK version:1.6.1

Steps to trigger behavior

If muteVoiceGuidance is previously set to true and then you try try to set it to false this does not do anything and the voice guidance remains muted.

I believe this is due to the following code in NavigationView https://github.com/mapbox/mapbox-navigation-android/blob/a4a244c37507a551ecb58cdccc910899f7547d1f/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/NavigationView.java#L966

  private void initializeVoiceGuidanceMuteState(@NonNull final NavigationViewOptions options) {
    if (options.muteVoiceGuidance() && !isVoiceGuidanceMuted()) {
      navigationViewModel.setMuted(((SoundButton) retrieveSoundButton()).toggleMute());
    }
  }

This only runs if muteVoiceGuidance is true. When it's false there is no code to set the mute status on the navigationViewModel back to unmuted.

Expected behavior

Setting muteVoiceGuidance(false) should unmute the voice guidance and voice instructions should be played.

Actual behavior

Voice instructions remain muted.

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 in libnavigation-ui/src/main/java/com/mapbox/navigation/ui/NavigationView.java at initializeVoiceGuidanceMuteState, and inspect how NavigationViewOptions, navigationViewModel, and SoundButton represent mute state. Reproduce changing muteVoiceGuidance from true to false; done means voice guidance is unmuted and voice instructions play.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.