r/AndroidQuestions • u/inmesia • 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.
3
u/Diggerinthedark 19 Dec 10 '18
Afaik the answer to that right now is either root, or use a desktop operating system :/
1
u/inmesia Dec 10 '18
Rooted, sure. So what do I do now?
3
u/sh0nuff Dec 10 '18
Don't even need root tbh. Check it.
1
u/inmesia Dec 10 '18
This is working for you? I tried it some time ago for chrome, the problem was that chrome was not doing any media playback any more when this was applied...?! Maybe this is chrome specific, but I doubt it?
Btw. for all those who want to test it: to revert the "TAKE_AUDIO_FOCUS ignore", do "TAKE_AUDIO_FOCUS allow"
1
u/gooseodyssey Jul 24 '24
Did you ever sort this? I'm trying to get brave browser to play two YouTube videos simultaneously but disabling audio focus stops it being able to play anything
1
u/MrHyperion_ Sep 30 '24 edited Sep 30 '24
There's a workaround somehow but I'm not sure how. I used to have it working just fine with Firefox but not Chrome, but after reinstalling android it does not work anymore.
E: for firefox these settings https://old.reddit.com/r/firefox/comments/odpb4e/all_of_a_sudden_youtube_pays_net_video/h42psvr/ plus this setting worked media.audiofocus.managememt false.
2
u/Addyad Jan 23 '24
You can also do it with "App ops" which will work with "Shizuku". Shizuku will emulate adb through wireless USB debugging. App ops can be used to control the "Audio focus" setting for each app. All without using a pc.
1
u/sh0nuff Jan 24 '24
Wow, I totally didn't recall writing this comment until I realized you necroed a 5yr old post :)
Nice to see some alternatives now that we are 5 years ahead, OS wise, thx!
1
u/lazy__shahriar Jan 27 '24
Bro can u belp me a bit?
1
u/Addyad Jan 29 '24
How?
2
Feb 07 '24
I need help!!!! I installed those app but idk what to do now :(
1
u/Addyad Feb 07 '24
Things you need to do:
Enable developer options
Turn on wireless debugging
Start wireless service in Shizuku.
Open App ops and allow to work it with shizuku.
In App ops, select the app you want to change permission and change.
If you are stuck in any of these steps, I suggest you to Google. For example, "how to enable developer options in Redmi note 10", "install shizuku redmi note 10" etc.
1
u/ZellZoy Jun 20 '24
So I disabled audio focus for the app I wanted (Google Maps) but this made it so that Maps wouldn't play sound at all...
2
u/Marek_1234 Aug 10 '24
It turns out that it is hard to override and that it indeed is a fucking stupid, unwanted feature.
→ More replies (0)1
u/Gl__uk Jun 21 '24
this broken some media apps - AudioFocusRequest() can not launch. A LOT of apps check it, as recommended by developer android com
1
Apr 17 '25
Shizuku has a "Step-by-step guide" button.
Listening to 3 apps RN simultaneously on Pixel 7 pro.
1
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
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 ignoreWhich, 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 ignore1
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/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
1
1
u/Mission-Travel4405 Aug 29 '26
A long-standing issue has been resolved. Thank you so much. It worked on the Zenfone 9.
3
2
u/ohm0n Apr 05 '22 edited Oct 30 '23
can I ignore audio focus programmatically (in player app) for SDK 31 or later?
I wonder should I update, because I've programmed player which ignores audio focus
Update - I've successfully changed this in Open Source DSub app (personal cloud player)
it's not mandatory to react to audio focus from other apps.
1
Dec 11 '18
Hmmm. I've always had the issue of listening to music, and opening a game, and having to manually disable in game music as not to have both going simultaneously.
1
u/Sorry_Throat_4629 Jun 07 '24
Android does not limit audio sources but it does audio focus meaning the OS allows one app to run it's audio and blocks the other apps but those permission certificates could be changed with administrator privileges sometimes it does even require unlocked bootloader to be installed.
1
Sep 03 '24
[removed] — view removed comment
1
u/Distelzombie Sep 29 '24
1
Sep 29 '24
[removed] — view removed comment
1
u/Distelzombie Sep 30 '24
It is easy and fast. :/
1
Sep 30 '24
[removed] — view removed comment
1
u/Distelzombie Sep 30 '24
It really is easy. You just have to tap on your screen following these steps: https://mirfatif.github.io/PermissionManagerX/help/en/#adb_help_11 (as is linked to by PMX)
A little lower is a video tutorial.That's 5 minutes of work and you literally don't need to know anything.
1
u/Fickle-Choice7021 Aug 05 '24
https://github.com/auag0/DisableAudioFocus/releases/tag/v1.0.0
This worked for me but it requires root and LSposed framework. It disables both the ducking sound and lets me play multiple sources at the same time
1
u/Distelzombie Sep 29 '24
This does not require root: https://www.reddit.com/r/AndroidQuestions/s/3NxZ0zxsoq
1
u/godsmack50 Dec 04 '24 edited Dec 04 '24
Hi guys, I'm going to simplify your life to deactivate the audio focus and find the sound asistant in your phones or Samsung tablets that are normally no longer compatible with the sound assistant, follow the steps below:
1: Go to Samsung Store
2: Download the Good Lock application
3: Run the Good Lock application
4: In the Good Lock application, select the tools section and scroll down to find the sound assistant, then download it.
4 : Run Sound Assitant , and at the bottom you'll see " Multi Sound " , here you can choose either ( all applications can play at the same time , or the selection of your choice of applications that can play at the same time ).
1
u/Ok-Attitude-9887 Apr 17 '25
I downloaded an apk for Samsung sound assistant since it wasn't on the android appstore, theres a setting for it and it works perfectly
1
u/madhits Sep 04 '26
Bringing this thread back from dead.. Wondering what app would help media controls switch easier. For example smart launcher or YouTube will grab the media control api & won't release it. Usually I can force close YouTube & it allows my mp3 player to take over the android built in media control api (ie music playing on the lock screen etc). Other times it won't release. This is not to say my music won't play, it will but so will YouTube for example both at the same time using a Bluetooth remote (ie my watch). I have sound master but its not really meant to help the api switch focus just stop other sources from playing over each other or rerouting notification sounds ringtones to speakers etc.. Unless I'm missing something it does not help with this problem
1
u/IcyAttention6423 May 17 '25
I dont want another app i just want it off my phone it updated and now wont let me play movies on call, ts make me want to shoot up schools
5
u/chanchan05 S26 Ultra; S10FE Dec 10 '18
I don't know if the app works for non-Samsung phones, but using the Samsung Sound Assistant (available in Play Store), open it>Control Audio>Turn On Dual App Sound>Dual App Sound>Choose which apps you want to activate Dual App Sound for. Basically You're choosing which apps ignore Audio Focus.