SimpMusic icon indicating copy to clipboard operation
SimpMusic copied to clipboard

Music not playing after TAKE_AUDIO_FOCUS is revoked

Open rabaimorp opened this issue 1 year ago • 2 comments
trafficstars

Describe the bug App can't play music after TAKE_AUDIO_FOCUS is revoked

To Reproduce Steps to reproduce the behavior: # appops set com.maxrave.simpmusic TAKE_AUDIO_FOCUS ignore Restart the app Try to play music (and it doesn't work!)

Expected behavior After taking audio focus and restarting the app music still plays but doesn't take audio focus anymore.

rabaimorp avatar May 28 '24 13:05 rabaimorp

What is TAKE AUDIO FOCUS? I never heard before

maxrave-dev avatar Jun 03 '24 09:06 maxrave-dev

Its an app operation that is allowed for all apps by default, however the user can disable it manually. It allows apps to play audio that takes over (stops) other audio playing at that time. All apps do this by default, but I usually disable this in the apps I use because it prevents multiple apps playing audio at the same time. The bug is that SimpMusic simply stops playing audio entirely if I disable TAKE_AUDIO_FOCUS for SimpMusic by running the command as root or adb shown above.

rabaimorp avatar Jun 07 '24 13:06 rabaimorp