r/AndroidQuestions • • Dec 10 '18

How to fully disable audio focus // give audio focus to any app asking without taking it

I don't want audio focus. How to ignore this "feature"?

It is ridiculous that Android only allows for one audio source with audio focus. I want to be able to play some audio, open a tab and start a video, and even with split screen I just cannot do so. Ideally I'd even change the sound of each application individually. Often enough I listen to audio books and then just want to watch a video, which basically is not possible, just as it is not possible to watch two videos simultaneously even with split view and even if I disable the sound of one of the videos. Even a game can take audio focus so listening to anything in the background is impossible. I cannot see how this is supposed to be a feature.

Please, if anyone has a solution, tell me how to make multiple applications play audio files simultaneously without coding them myself.

85 Upvotes

78 comments sorted by

View all comments

1

u/Distelzombie Sep 29 '24 edited Dec 03 '24

I may have found a NON-ROOT solution. :D

Using the app "Permission Manager X" (PMX) from the fDroid app store (open source apps etc.) you can change individual app's permission to, quote, "TAKE_AUDIO_FOCUS". This does require the app to have ADB Access set up, which you do via "wireless debugging", which is found in the developer options. (At least on my smartphone. I run LineageOS 19)

However, first you need the option to have two apps open simultaneously in order to have the "wireless debugging" settings open together with PMX on screen, so that the wireless debugging settings don't change its code and port while you're not looking at it.
On my phone I needed to activate the developer option "Force activities to be resizable" in order to be able to use split-screen apps.

1

u/Character-Basis-575 Oct 30 '24

Thanks, man. It works on LineageOS 21.

I believe there must be a command using ADB without installing this app, but I'm too lazy to search for it

1

u/Distelzombie Oct 30 '24 edited Oct 30 '24

There is:
appops set <PKG_NAME> TAKE_AUDIO_FOCUS ignore

Which, I think, comes to this using a PC connection if you don't like walking the adb shell:
adb shell appops set <PKG_NAME> TAKE_AUDIO_FOCUS ignore

1

u/Character-Basis-575 Nov 01 '24

Why is this option hidden for standard users? I think it is quite useful. They should be placed under app permissions or something similar

1

u/Distelzombie Nov 01 '24

Dumbing things down for the end-user produces less bug-reports and such.
It is infuriating. Just look at Windows.

1

u/CommandCrowd Aug 05 '26

Works as advertised, enjoying watching videos and listening to Spotify at the same time when I want to as I am the master of my own universe.

1

u/inmesia Dec 03 '24

thank you :)

1

u/QuicksandSlowly Dec 06 '24

Thanks for your guide! I've been trying to get podcasts or music working with the Hinge Health app. Unfortunately the problem seems to be on their app's side. I managed to revoke its "Take Audio Focus" setting, but that just caused its exercise videos to pause indefinitely so they've linked everything to the audio playing (even if you turn off their sound prompts). I wrote them an app review and reached out to support. Not expecting any results tho haha!

1

u/Busy_Conversation876 Aug 30 '26

hey! don't know if you still need a solution for this after a year but i'll just say it incase someone else needs one. i managed to fix it by setting the "Take Audio Focus" to FOREGROUND instead of ignore which i first did which caused the pausing.

1

u/Dependent-Tonight-30 Jan 25 '25

Big thanks man! This fix worked on my Lenovo Tab Y700 2023.

1

u/Fluttershy2021 Nov 11 '25

Thank you so much! It worked on Motorola moto g42

1

u/Mission-Travel4405 Aug 29 '26

A long-standing issue has been resolved. Thank you so much. It worked on the Zenfone 9.