here-android-sdk-examples icon indicating copy to clipboard operation
here-android-sdk-examples copied to clipboard

Audio system plays 3 beeps periodically during navigation

Open aardvarkk opened this issue 4 years ago • 1 comments

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):

  • Device: PDA
  • OS: Android 9
  • SDK Version: 3.17.2.132 (Premium Edition)

aardvarkk avatar Jan 22 '21 20:01 aardvarkk

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.

prostolyalya avatar Feb 02 '21 13:02 prostolyalya