Background service audio is stopped when starting Game (Android)

Hi,

I released a new game recently with cocos2d-x 3.16 and I found a bug:
When the player starts his own music in another specific Music app, when he starts the game, his background music stops (I don’t play music in my game, only sound effects). He can then resume his music by using the notification bar, but when the game goes to background and back to foreground again, it stops his audio again.

I didn’t get the issue in my previous game released with cocos2d-x 3.9.

I checked quickly and it seems to work if I comment registerAudioFocusListener. I understand some games want this, but there should be a way to disable it, IMO.

Tell me what you think,

@Frozax

Interesting. I wonder if the same behavior happens on iOS too.

Well known regression introduced in 3.16 :frowning:


It is Android only regression
I hope that it will be fixed in next release…

It seems like there are some random crashes after that. Please see attached ticket

Thanks for the info, I replied in the ticket with my “fix”.