MMA + Bluetooth stutter then stop playing

Get answers about the current release of MediaMonkey for Android

Moderator: Gurus

bkenobi69
Posts: 412
Joined: Tue May 19, 2009 1:35 pm

Re: MMA + Bluetooth stutter then stop playing

Post by bkenobi69 »

With MMA in background and a couple other apps touched (Chrome, Maps) Android eventually killed off MMA. I'll find another device to record what it does. Should I just put the phone down and record until it starts stuttering or record what the stuttering and eventual death of MMA are? It could take a few minutes or be quick I'm not sure yet.
bkenobi69
Posts: 412
Joined: Tue May 19, 2009 1:35 pm

Re: MMA + Bluetooth stutter then stop playing

Post by bkenobi69 »

If i start playing a track, put another app in the foreground, then turn off phone the audio from BT headset is reliably stuttering. It appears to often kill playback. I just checked and the last 2x that's happened the headset has been disconnected when I turned phone back on.

I will find another device to record this. Is it possible the OS is attacking the BT instead of MMA and when the BT goes away MMA turns off (which i believe is by design)? I'm not sure how to ecxlude the BT service from optimization to test this theory.
bkenobi69
Posts: 412
Joined: Tue May 19, 2009 1:35 pm

Re: MMA + Bluetooth stutter then stop playing

Post by bkenobi69 »

I think BLE is the key here. I just found some info that pointed to a link between BT and WiFi that may be a temporary solution pending more testing.

Theory right now:
Apparently if BT is on but WiFi is off and the phone screen is switched off or the app using BT is in the background the OS switches to BLE which among other things reduces range. On my phone with the screen off (BLE mode presumably) I don't generally see problems if I'm looking at the screen. If I set the phone down I have issues. So the range drops connection at around 12-24". If the phone is in this range its unreliable. In my truck the phone sits around 18" from the screen.

If WiFi is turned on then the chip remains in standard BT mode so range is not reduced.

With very little testing i can say:
Wifi off - turn screen off and there is immediately a pause in audio. Set phone down and move away audio starts to stutter.
Wifi on - turn screen off and no issue. Set phone down and move away and no issue for at least short distance (have only tried ~5' max).
bkenobi69
Posts: 412
Joined: Tue May 19, 2009 1:35 pm

Re: MMA + Bluetooth stutter then stop playing

Post by bkenobi69 »

I tested this with my headset, Uconnect head unit, and travel trailer stereo. In all cases turning on wifi has fixed both the stutter problems as well as dramatically increased range when MMA is not in foreground or the screen is off. I am now positive this issue has to do with the OS switching from full BT down to BLE.

I'm not a coder, but is there a way to have MMA force BT classic instead of allowing Android to drop down to low energy? This must be a new setting that was applied somewhere in my setup early to mid 2021 which is when this started becoming a problem (or at least I noticed it).

As i mentioned, the temporary fix is to always have wifi enabled (even if not connected). This apparently puts the chip in wifi scan mode so the BT side is not in LE. I dont need wifi necessarily scanning though so would be nice to have that decoupled.

You should be able to replicate by turning off wifi and either putting MMA in background or shutting off screen.
Peke
Posts: 17484
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: MMA + Bluetooth stutter then stop playing

Post by Peke »

bkenobi69 wrote: Fri Jun 03, 2022 9:16 am You should be able to replicate by turning off wifi and either putting MMA in background or shutting off screen.
Nope. No issues, but as soon as I pause playback headphones go to BLE :( and I get 100ms stutter on playback start.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
bkenobi69
Posts: 412
Joined: Tue May 19, 2009 1:35 pm

Re: MMA + Bluetooth stutter then stop playing

Post by bkenobi69 »

I get a very short stutter when i turn screen off (presumably BLE switch) but after some time the signal must be dropping enough that the OS kills the connection. I wish a log could be produced with data!

Fwiw, this is an A10e on AT&T so perhaps it receives updates at a different cadence than other Android phones.
Peke
Posts: 17484
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: MMA + Bluetooth stutter then stop playing

Post by Peke »

Hi,
Not sure why I tried contacting Samsung and get answer why they have that aggressive background task policy, unfortunately I never got answer.

Last time I had Samsung phone it was years ago and I exchange it for lesser phone just because I had so many issues with their customization than with all other brand together.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Post Reply