Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Take Audio Focus no longer working Android 15 #54

Open
WildFyr16 opened this issue Dec 23, 2024 · 1 comment
Open

[Issue] Take Audio Focus no longer working Android 15 #54

WildFyr16 opened this issue Dec 23, 2024 · 1 comment

Comments

@WildFyr16
Copy link

I use PMX for a lot of different things, but the biggest being stopping apps from taking my audio away from other apps. For instance if I am listening to music and open TikTok to check notifications I don't want it pausing my music (that app in particular has next to no allowed permissions in general). My Pixel told me there was an update available the other night, Android 15, I installed it as I have done before. However, ever sense the update apps that play audio can now take my audio focus even if I deny the permission. I am not sure if this is specifically a Android 15 thing or an issue with the app. It is slightly annoying to have my music replaced by some brain rot degenerate 3 second video audio when all I want is to clear a notification bubble or respond to a comment.

@mirfatif
Copy link
Owner

This issue has been reported earlier by other users. I've made a few quick tests today. It's a bug in Android 15, and hopefully not the expected behavior. Because as per official docs, Android ducks / mutes the playback of an app when it loses audio focus (which should happen if TAKE_AUDIO_FOCUS is not granted).

And this was the behavior up to Android 14, as I had written this answer some time ago. Interestingly, this behavior is still valid on Android 15 if the app targets Android 15. But if the app targets some earlier version, this no more works.

Let's hope this get fixed in upcoming Android releases. Others are facing the same problem. And there are other issues in Android 15 related to audio focus. AOSP team has made some changes to audio focus handling. Among others, TAKE_AUDIO_FOCUS check has moved from MediaFocusControl to a new class HardeningEnforcer. Seems like these changes didn't go well.

And sorry. Fixing this is beyond our domain: I've changed a permission but it's not working. Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants