Disabling audio focus on android - Android Q&A, Help & Troubleshooting

Edit: Found an app that works, see comments.
Hey, is there any currently working way of disabling audiofocus for centan apps?
I want to listen to music on spotify and play video audio out of chrome or opera at the same time. I would prefer for the sporify audio to duck (reduce the volume) when opera is playing audio, but not stop compleately. If ducking isnt an option, playing with the same volume is fine too.
Ive tried the ADB command thing here on chrome, but it just made chrome not able to play any video. The video would play for .1 second and stop everytime.
Also ive tried samsung sound assistant, but a) there isnt an option to disable audio focus on apps anymore, b) my tab s2 (gts210velte/SM-T819) cant run the app anymore after installed lineage os 16.0 (android 9)
I dont care if its an app i have to buy, but i just need to be able to play multiple audio at the same time. If i cant mess with audiofocus is it possible to make spotify automatically play the music again after the other audio stops? Now i have to lower the drop-down notification bar and continue evrery time and its driving me crazy!
Also, the tablet is rooted via magisk.
Any help is appreciated

Bump

Anybody?

Nnm, if anybody has the same problem: found an app called app ops (root) that allows to disable audio focus.
First touhgt i had to disable it on opera browser, but when i did this opera wasnt able to play anything, then i disabled it from spotify and now its working as intended.
99% sure it works on chrome too.

Mirovalol said:
Nnm, if anybody has the same problem: found an app called app ops (root) that allows to disable audio focus.
First touhgt i had to disable it on opera browser, but when i did this opera wasnt able to play anything, then i disabled it from spotify and now its working as intended.
99% sure it works on chrome too.
Click to expand...
Click to collapse
Thanks! app ops offer exactly what i want and even more!

Wow, i forgot how i did this. Recently got a new phone, started googling and found this thread i forgot i made.
At first it wasnt working, but noticed that if you are using viper4android you have to change settings to "Legacy mode". Im guessing it will work fine if not using viper.

Im trying to achieved the same thing. Successfully gained access to disable audio focus but when i do that it just doesnt allow apple music to play anything. Any specifics i should do?

Hello,
Using App Ops, I disabled "audio focus" on the Spotify app, and was able to simultaneously play YouTube in browser (m.youtube.com via Kiwi).
Thanks for this discovery !

Related

[Q] youtube: problem with multitasking

seriously, and i mean it.. did you guys have trouble multitasking with youtube?
When you buffer anything inside youtube, and you switch to ANY other app for example browser or calendar or whatever, all the buffer you have done, will gone back to zero !! Wtf!
How stupid this is?? And i wonder why nobody has ever noticed this and complained about it somewhere over the net.
Yes, I have even basic problem with youtube. When I switch to another app, why does the video stop playing? Sometimes, I am only interested in the audio!
Osho
Hi, I'm having same prob and I don't think we can do anything to it ;/
Sent from my GT-I9003 using XDA App
oshogg said:
Yes, I have even basic problem with youtube. When I switch to another app, why does the video stop playing? Sometimes, I am only interested in the audio!
Osho
Click to expand...
Click to collapse
you mean the video stops playing but audio still play? I dont think so
denis_sianto said:
you mean the video stops playing but audio still play? I dont think so
Click to expand...
Click to collapse
No, the video can continue to play but in the background. For example, on a PC, if I have youtube video playing in a browser tab, and I switch to another browser tab - the video continues to play back. So, I can at least listen to audio (which is useful for music videos).
Thanks,
Osho
I have this problem and it annoys me, as I have very slow internet,so last thing I need is for it to restart again.
Sent from my GT-P1000 using XDA Premium App
oshogg said:
No, the video can continue to play but in the background. For example, on a PC, if I have youtube video playing in a browser tab, and I switch to another browser tab - the video continues to play back. So, I can at least listen to audio (which is useful for music videos).
Thanks,
Osho
Click to expand...
Click to collapse
Yea, i know that if in pc, you switch to another tab, youtube would still continue buffering. But this did not happen in tab's youtube. If I buffer any video, and then i switched to browser, then switch back again to youtube, all the buffers would have gone to zero.
Are you 100% sure you dont have this problem with your stock youtube app?
vauxhallastra said:
I have this problem and it annoys me, as I have very slow internet,so last thing I need is for it to restart again.
Sent from my GT-P1000 using XDA Premium App
Click to expand...
Click to collapse
Are you talking about p1000 or the new gt with honeycomb?
Don't be fooled into thinking that Android's multitasking is that much more robust than iOS. When you move away from an app, the system sleeps the VM that it is running in to devote clock cycles and memory to your current working application. The only way an app can continue to persist alive in the background is to specifically request to remain alive and working on something with background processes. The YouTube app doesn't do this, so when you move away from it the application sleeps.
The only advantage Android has over iOS in terms of multitasking is the easy ability for an app to run background processes if it so chooses. Fortunately no sane app developer is going to write an app that tries to stay completely active in a non-windowing OS.
sassafras
sassafras_ said:
Don't be fooled into thinking that Android's multitasking is that much more robust than iOS. When you move away from an app, the system sleeps the VM that it is running in to devote clock cycles and memory to your current working application. The only way an app can continue to persist alive in the background is to specifically request to remain alive and working on something with background processes. The YouTube app doesn't do this, so when you move away from it the application sleeps.
The only advantage Android has over iOS in terms of multitasking is the easy ability for an app to run background processes if it so chooses. Fortunately no sane app developer is going to write an app that tries to stay completely active in a non-windowing OS.
sassafras
Click to expand...
Click to collapse
Okay, i know it make sense to not write an app that tries to stay completely active in background. But wouldnt it make sense for an app such as youtube that needs a lot of buffer (since not all country in the world have fast mobile connection), to be partially active in background, such as the buffering ability?
I think that make sense! And i still wonder why wouldnt honeycomb developer realize this .
Sent from my GT-P7500 using XDA App
Be careful, Playbook owners might start feeling smug about their device if they see things like this
Sent from my GT-I9100 using XDA App
I would also like Youtube to be able to play in the background, just like on a PC. Why not? It can't be too hard to programme either.
Swedish national radio, Sveriges Radio, has a good app that allows you to listen to all their programmes and the app runs smoothly in the background while I surf or do other stuff on the tablet. You'll find it at Google Play (former Market) if you're interested.
An other thing that Youtube on Android does not do is to run playlists. Again, why not?
I can't really see the point in removing great features when you develop a new OS. The goal can't really be to make it worse compared to the PC, can it?
labovski said:
An other thing that Youtube on Android does not do is to run playlists. Again, why not?
If your mostly worried about the playlist feature, it works when running stock browser and you are signed in. All you have to do is tap on the bottom-right corner of the video's preveiw image, afterr tapping, the little '+' shows up
Sent from my GT-P7500R using XDA
Click to expand...
Click to collapse
A solution would be using OverSkreen (Browser) and just open youtube in a small window.

[Q] Two Major Problems with the S3 (Help)

Ok so I've had the S3 since yesterday and needless to say its a pretty incredible piece of kit.
However I've encountered two problems I can't get around;
1. I can't seem to get my music player onto the lock screen to easily change track, I've tried a variety of players but none seem to take over the lock screen no matter what settings are used? Anyone know a fix?
2. Whenever I use the internet on my phone using desktop mode or any internet browser, when trying to watch videos other than on Youtube I always get the "You need Flash" instead of the video, I never had this problem on my Note...
Are there any quick fixes to this? I don't want to root my device...
For 2) it's probably a case of you needing to go the Play Store and downloading Adobe Flash
Sent from my CM9 TouchPad
Haha
I would have thought by the fact i'd posted here it would have been assumed Id already downloaded Flash .
I have Adobe Flash Player 11 with the fix for ICS, however playing videos I could on my Note just isn't happening on the S3 and i'm not sure why!
Mikeashford20 said:
I would have thought by the fact i'd posted here it would have been assumed Id already downloaded Flash .
I have Adobe Flash Player 11 with the fix for ICS, however playing videos I could on my Note just isn't happening on the S3 and i'm not sure why!
Click to expand...
Click to collapse
If there are videos with commercials, it can be that the popup blocker of the browser blocks them.
It happened to me too just because the website I tried, needed to have the commercials downloaded first before it could start the playback.
Are you using the same browser on both phones?
About the first problem it works ok for me so i really dont know. (stock music player)
the above two problems are not major!! i will tell you a major problem and that is an auto focus issue while recording video looses its focus and moves too and fro awkwardly video help help!
I have the same problem as number 1: The stock music player on the galaxy s3 does not appear to have any control on the lockscreen. It's strange because on my Galaxy S it works perfectly.. Anybody have ideas on how to resolve the issue, without going to 3rd party apps/widgets?
It's annoying but at least you can pull down the notification bar and get it there.
Also the headphones do volume but not tracks... F'n annoying.
I find the music player a bit ****, wish I had access to Google Play Music from 4.0.
The only way is pull down the notification bar
Mikeashford20 said:
Ok so I've had the S3 since yesterday and needless to say its a pretty incredible piece of kit.
However I've encountered two problems I can't get around;
2. Whenever I use the internet on my phone using desktop mode or any internet browser, when trying to watch videos other than on Youtube I always get the "You need Flash" instead of the video, I never had this problem on my Note...
Are there any quick fixes to this? I don't want to root my device...
Click to expand...
Click to collapse
In order for you to play the videos using the browser, you need to switch back to android mode(phone mode), the flash player, especially the adobe one, do not support desktop mode.
To sort it, you need a flash player that supports desktop mode which i don't know if there is already existing app like that.
So, there is no way to get it working properly, only notification bar? That's weak..
Btw. I have also problems with flash. Youtube works fine but sometimes it just keeps loading and doesn't play ( from the internet browser). What's the deal with all these issues, I thought SG3 will be flawless..
I wanted to follow up on this, I find the music player extremely annoying. The headphones not changing track I can live with for the time being.
Any solution on how to access the on screen music player besides the notification bar from the lock screen?

Jelly Bean Audio Issue

ok i dont know if there is a fix and i had tried to find, but everytime i reboot i have have to open my audio play, whether it be google music or mog or any music player and then i have to kill it then reopen and music works. does anyone know of a fix for this to avoid in having to open and kill it on every reboot? thank u,
I cant be the only one with this prob. Come on
I cannot honestly say I have heard of anyone on JB that has such an extensive issue with Audio...
I have run JB since I got the device and besides some early issues that have already been resolved... it was still never as bad as your experiencing!
I can only say to try and go back stock 100%, then once you have go through samsung kies and do the emergency firmware restore/wipe thingy, then try going back to a freshly downloaded copy of the JB rom of your choice...
Sorry your having so many issues
It is actually only when i play music from the device not streaming. I flashed the same rom on a stock ics note and they have the same issuez.
Bradl79 said:
It is actually only when i play music from the device not streaming. I flashed the same rom on a stock ics note and they have the same issuez.
Click to expand...
Click to collapse
Interesting, loaded a few songs from one of my old CD's, didnt have an issue :/
Sorry for you man, that really sucks
Yes I have this problem also. Always have with JB.
Sent from Valhalla
Main ones i use is google music and mog
Bradl79 said:
ok i dont know if there is a fix and i had tried to find, but everytime i reboot i have have to open my audio play, whether it be google music or mog or any music player and then i have to kill it then reopen and music works. does anyone know of a fix for this to avoid in having to open and kill it on every reboot? thank u,
Click to expand...
Click to collapse
That was really hard to read.
Are you saying that you have no sound upon booting, until you open a music file?
If so, what music effect apps do you have installed? Check in the sound panel, inside the settings app.
Do you have Volume+, MusicFX, or Volume Boost? Anything like that?
Sent from my Transformer Pad using XDA Premium HD app
when i open up google music, i click on a file and it just hangs, until i kill the app reopen then the file starts up normal, this happens everythine i reboot i have to do this after i do that its fine until i reboot again, also when i stream music it is just find its only when i play music on the device, this also does the same with MOG
Audio hang on i717 with Jelly bean
I have the same problem but not with every music app. Power amp works no problem but the apps I use for audio books Mort Audio Book Player or Smart Audio Books do not work unless i force close and then reopen. I have sometimes avoided the problem by opening a book in an alternate method so I suspect it may be something related to how the apps store the position in a track.
I also had problems with Map my run a run tracking app that can announce when you have run a certain distance. Map my run would capture audio focus and never release it. So my music would go silent until reboot. I am running CM10 stable but think I'll go back to CM9 becuase i use the audio book apps a lot and am too impastient and easily irritated to keep having to force close the apps. I have even had to battery pull on occasion but probably only because I was too impatient for the phone to come back online.

[Q] The best way to stream music from youtube in background on any android device

Hi,
I have been a silent reader/observer of xda forums for a long time now and I thank everyone of the awesome developers out there for giving such good ROMs.
I've been meaning to ask this question for a long time but I was delaying it hoping I can get an answer for it myself. But today after spending close to 5 hrs on this with no answer I decided to ask it here.
I'm a music fan and I'd like to listen to it on my phone as well. I have an HTC One XL with the latest Viper ROM.
I have tried the following options.
1. Downloaded numerous apps (PVStar, NextVid and the likes). Some worked but not to my satisfaction. They're either very laggy or buggy or have unattractive UI to use.
2. Visited sites like youtify.com and tried on various browsers. (Chrome, firefox, UC, Dolphin, Opera etc.) hoping it won't stop playing audio when switched to another app or screen locked. On chrome and all the others it just stops playing audio when you switch to another app. On firefox it works but when screen is locked, audio becomes choppy (app's priority gets lower I think slowly). I tried to search for apps which can keep an app's priority higher but in no vain.
3. I also tried to find alternatives to Youtube like grooveshark app but it just keeps crashing whenever other apps are launched. I also tried Radio apps like TuneIn radio or pandora but you can't search for specific songs there.
P.S: Also some YouTube videos are specifically blocked by Google itself to not stream it to other apps/sites I think. How can we avoid this?
So, basically my problem is I need to be able to search and stream Youtube videos (Preferably have my own saved playlists) on my android phone while the screen is locked or in background while accessing other apps. (I know google is trying to bring 'play in background' feature to YouTube app itself but we can't create playlists there if I'm not wrong). Please suggest me a solution.
Thanks.
http://www.makeuseof.com/tag/play-youtube-videos-background-even-screen/
or
http://forum.xda-developers.com/showthread.php?t=2213945
es0tericcha0s said:
http://www.makeuseof.com/tag/play-youtube-videos-background-even-screen/
or
http://forum.xda-developers.com/showthread.php?t=2213945
Click to expand...
Click to collapse
Thanks for a lot for the links. Tried both but the first one (Viral) is not so stable. It crashes often and a pain to use. However the second option (Modded youtube APK) seems to be the best option. I can have my own playlists saved in my youtube account and play them using this modded youtube app. The music will continue to play even when screen is locked but the app must be in the foreground. The moment you switch to another app or press home button or even pressing "back" within youtube, it stops.
It's a solution I can live with for now, but I would love to have something which can run even when in background. Suggestions welcome.
Thanks.
[BUMP] Any youtube modded APK?
Trying to bump up this as I wasn't able to find a modded youtube APK which can continue to run in background (i.e. even after pressing home button and accessing other apps). Right now the modded APK only allows screen to be locked but the app should remain in foreground.
And the youtube APK also doesn't play all files in playlist. It plays just one file that we select and stops after that even though there are other items in the playlist.

Play youtube vids while screen is off ""NoRoot""No3rdPartyApps""

Play youtube vids while screen is off ""NoRoot""No3rdPartyApps""
Hi,
So I Discovered a way to play YouTube videos without the need of being in the youtube app, You can even play when The screen is off
# This method does not require youtube red
# No root is needed
It's actually pretty simple all you need is headphones or earphones with a pause/play Physical button.
1) Plug in the headphones
2) Play any youtube video from the youtube app.
3) Press your home button or switch off your screen, But don't remove youtube from memory.
4) Now all you need to do is click the Physical play button in your headphones.
Idk if it does work on other devices. But it worked on mine
LG G5 (H850) running nougat
Lol that actually worked. It's probably a bug, but i'll take it while it lasts.
the other way, is to use firefox instead of the youtube app.. you can keep it playing in the backgroud or with screen off
Or use OGyoutube. There is a NoRoot version and it enables background play, download and screen off play. I'm using it right now.
@stay-down
My poster-of-the-day
stay-down said:
Or use OGyoutube. There is a NoRoot version and it enables background play, download and screen off play. I'm using it right now.
Click to expand...
Click to collapse
Yup, OGyoutube ftw!
Works on Bluetooth in my car as well.
Anyone have a link to a clean ogYouTube apk? The one I found is telling me to add an install of something else, microG; Avast didn't flag it, but better safe than sorry.
markfm said:
Anyone have a link to a clean ogYouTube apk? The one I found is telling me to add an install of something else, microG; Avast didn't flag it, but better safe than sorry.
Click to expand...
Click to collapse
Sorry, I should have mentioned that. The microG APK is required to run OGyoutube.
Got it, thanks! I looked it up, it was legitimate, so I went ahead with the install.
It's an older post but you can also go to the youtube home page, request desktop site, start a video, turn off the screen, turn on the lockscreen and press play.
That was my method until today. Now I use just the play button on the head phones.
thanks.
No Pause Lock
try No Pause Lock for youtube with lock screen nopauselock eu
Or you guys could just get Ogyoutube. That's what I use to play videos in the background
Y Music is also awesome. Doesn;t play the videos, just music. No ads, and background play.
You can also download.

Categories

Resources