heremaps / here-android-sdk-examples

Java-based projects using the HERE SDK for Android.
Apache License 2.0
146 stars 191 forks source link

Audio system plays 3 beeps periodically during navigation #426

Open aardvarkk opened 3 years ago

aardvarkk commented 3 years ago

Describe the bug During simulated navigation, the audio system plays three loud "beeps" occasionally. A warning is simultaneously output into logcat:

W/MediaPlayer: Use of stream types is deprecated for operations other than volume control
    See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case

Steps To Reproduce Steps to reproduce the behavior:

  1. Start a simulated navigation
  2. Wait for the audio to play

Expected behavior No random sounds should play and no warning logs should be produced in logcat.

Smartphone (please complete the following information):

prostolyalya commented 3 years ago

Hello @aardvarkk, These 3 beeps sound plays on specific navigation events, like maneuver change, rerouting, etc. This happened in NavigationManager.AudioPlayer. You can change the behavior of playing sound by creating NavigationManager.AudioPlayerDelegate with your rules. By default AudioPlayerDelegate will allow the SDK to handle it. For more details about AudioPlayer and AudioPlayerDelegate you can read this and this.