Audio system plays 3 beeps periodically during navigation
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:
- Start a simulated navigation
- 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)
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.