Audio playback in sideloaded apps on the background stops after 55 seconds

Hello all,

I know Mudita doesn’t guarantee sideloaded apps to work, but this is a bit odd nonetheless.

I installed Auxio for music and AntennaPod for podcasts. They used to work fine, and played audio in the background without issue.

Since a few days, and without a software update to explain it, audio playback in the background stopped working.

If now I play music or a podcast, and I lock the phone or simply exit the app, audio playback stops after about 55 seconds. I have to then push the play button again. I thought it was a memory issue, so I uninstalled the FUTO keyboard (quite heavy on memory) and stopped all other apps. But this didn’t resolve the issue, and moreover the phone doesn’t stop the app to clear memory, only stops playback.

The stock Mudita Music app doesn’t have this issue, though. And what’s more, is that when I play music on the Music app, and then play music on Audio, the audio mixes. Both apps are playing at the same time.

Any help?

Edit: the solution is further down. I solved it with battery optimization settings.

4 Likes

I can’t confirm that. AntennaPod, Spotify, and the Fossify music player work perfectly for hours on my Kompakt.

2 Likes

@thilodus same here, until a few days ago

1 Like

I reported the same issue, specifically about AntennaPod:

I agree with you that Mudita is not responsible for quirky behavior by sideloaded apps.

My latest approach with my Kompakt is to return to using my SIM-less deGoogled Pixel 6 for using the AntennaPod and Audible apps – just as I was using my Pixel in this way when the minimalist Sunbeam Wireless F1 Orchid was my go-to cellphone.

I uninstalled the sideloaded AntennaPod and Audible apps from my Kompakt. If Mudita ever adds a podcast player, then I will consider downloading podcast MP3 files to my computer for transfer to the Podcasts folder on the Kompakt.

1 Like

@kirkmahoneyphd I’m considering doing a factory reset and sideload the few apps I need after experimentation. The issue started after installing and uninstalling some apps. Maybe one of the apps broke a hidden setting.

1 Like

Oh dear. Sounds like I should enjoy every day it still works.

1 Like

Hey. This issue came up with the latest OS update for me. I only have a single app sideloaded that is SomaFM radio player… the most important source of music for me for many cases… was playing fine than new OS popped up went through with update and the described behaviour occured. Seems can only keep running with screen kept open… although cant set the screen to stay unlocked ( also an annoying feature… i should be bale to set it to never auto lock … i used my iphone like this too… )

1 Like

I’ve just test it and found out that playback stops while streaming from AntennaPad on wired headphones and loudspeaker. Normally I use Bluetooth and during last few weeks I’ve never excepted any problems.
On the other hand sideloaded Apple Music plays in a background on wired headphones (Apple USB-C EarPods)

2 Likes

That’s even weirder. I won’t be factory resetting the phone, then. Something else seems to be going on.

I am enjoying the Music app, though, for limited use. If you put only music that goes together, and you use the shuffle, it’s like an iPod shuffle of the olden days.

1 Like

Btw, I just found out that if you flip the phone, it goes to lock screen. I figured I would listen to some music on my desk, but to not be distracted by the screen I flipped the phone. Hence the music stopped after 55 seconds.

4 Likes

I must admit that something strange has happened, and I don’t like it very much. As recently as Friday (today is Wednesday), I was listening to podcasts on AntennaPad for about 3 hours with the screen off (Mudita logo and padlock) via bluetooth headphones. Without the slightest problem. Today, when I wanted to listen to a podcast through the same headphones with AntennaPad, as I have been doing for the past few weeks, what @nilss writes about happened - after a minute the app stops playing audio.
What’s strangest, I didn’t change any settings over the weekend, didn’t update the app or the system. I didn’t do anything that would seem to affect this situation. The only thing is that for the first time the day before yesterday I connected headphones via USB-C to confirm that in my case there is no such problem :wink:

What’s even more interesting is that Apple Music still plays with the screen off. Let’s hope this continues, but the loss of the podcast app really hurts.

1 Like

I just discovered something even stranger. The Antenna Pad stops working after a minute even with the screen on, such as when playing chess or even checking the weather.
I found two threads on this topic, one unanswered: Playback pausing itself - Support - AntennaPod Forum and the other, from which it is not clear what the cause is, but it seems that the problem is Android 12: https://www.reddit.com/r/GooglePixel/comments/qe9bv1/android_12_pausing_media_bug/

1 Like

FWIW I tried to investigate this a bit. I noticed an error in the log Stopping service due to app idle: u0a124 -1m6s33ms

By running this adb command I was able to prevent Android from killing the playback service: adb shell cmd deviceidle whitelist +de.danoeh.antennapod

Antennapod was then able to play for about 3m30s before it died, but possibly just due to a crash. The log mentioned something about Duraspeed: DuraSpeed: de.danoeh.antennapod, appType: 0x2181, adj: 0 05-21 23:15:22.337 1064 1077 W ActivityManager: Scheduling restart of crashed service

Looking into this led to this thread: Sideloaded Apps dont stay running in Background! - #8 by miiiiiiiiiiiii

Where they recommend side loading ‘Activity Manager’ then checking duraspeed settings - Duraspeed is a process manager that tries to kill/stop idle apps so the premise is that you can whitelist apps to let them keep running in the background.

That said, I did a second test and played the podcast again and it has played for 10 minutes now without having to do anything further, so I will report back later if it’s at least working thus far.

1 Like

the only one setting working for me is:

each app set up with the setting works in the background even with locked screen

1 Like

Thanks for the tip! This worked!

2 Likes

I noticed the same behaviour. However when I installed “PocketCasts” instead of AntennaPod just to see if it had the same behaviour the PocketCasts app actually asked to be allowed to continue being used in the background.

That got me thinking that I did not see any of these permissions asked for by Antennapod.

Anyway, what I did was I searched for “Battery” in the Developer options window (magnifying glass top right) and then I went into Battery Manager and there you can go to “Restricted apps”. There you’ll see all (?) apps which are battery restricted. This included Antennapod for me and when I unchecked it from this list it started working properly.

Please try this method and see if it works :slight_smile:

2 Likes

As you can see I tried another setting, com.android.settings$HighPowerApplicationsActivity, and that worked.

2 Likes

Have someone tried with duraspeed setting?

1 Like

I hope, I am pretty sure it should be DuraSpeed messing with people’s alarms. I never had an alarm going off delayed. Many people on the Internet complain about this MediaTek’s creation.

1 Like

Thanks, i will try this!
edit : I can confirm this worked, thanks again!

1 Like