startAudioMixing to play a music file on Android devices, if you make or receive a phone call, the music will pause. However, the music file does not automatically resume playing when the call finishes.
The SDK cannot determine whether the phone call stops using the audio output device. Therefore, the music file does not resume playback automatically.
startAudioMixing, Agora recommends that you call
PhoneStateListener (an Android API) to listen for phone calls, and perform the following steps:
getAudioMixingCurrentPositionto retrieve the current playback position.
startAudioMixingagain, and call
setAudioMixingPositionto start playing from the retrieved playback position.