Announcements

Help Wizard

Step 1

NEXT STEP

Spotify should release Android AudioFocus when playback stopped

Spotify should release Android AudioFocus when playback stopped

Hi,

I am a developper working on AndroidTV, I noticed an incorrect Spotify behavior when playing Spotify in background, controlled by SpotifyConnect

 

I installed latest Spotify on my iPhone

I installed latest Spotify on my BboxMiami ( AndroidTV )

I login with my premium account on both devices.

 

I watched LiveTV stream using our own TV Application.

Then I used Spotify on my iPhone to start a music on my AndroidTV

Spotify on AndroidTV correctly took the AudioFocus to interrupt the LiveTV stream to play music.

But then if I stop music playback from my iPhone remote, the Spotify's music stops, but my LiveTV playback is not resumed.

I investigated Android and re-coded test application to reproduce the problem ( I can share it to Spotify team ), and I found the root cause :

- when music content is stopped in Spotify, spotify forgot to call this android method :

 

Abandon audio focus. Causes the previous focus owner, if any, to receive focus.
int abandonAudioFocus (AudioManager.OnAudioFocusChangeListener l)

 

you can find more details here :

https://developer.android.com/training/managing-audio/audio-focus.html

 

It would be great that spotify release the audio focus if it is not required to play music, that way other android application can get it back automatically, as expected by android.

 

best regards

Quentin Thiberville

Reply
1 Reply

fixed on Spotify v0.9.3.3 on Miami STB,

now the experience is really great, thank you guys 🙂

Suggested posts