Which app is playing media

8 views
Skip to first unread message

Yoan

unread,
Dec 29, 2025, 8:45:35 PM (15 hours ago) Dec 29
to Tasker
Hi everyone,
Is there a event that can be triggered when there is a change of which app is playing media?

My issue: in my car, I have a standalone Android device running CarPlay navigation (connected to iPhone) and playing music (using the built-in audio player) at the same time. The navigation volume (from CarPlay) is way too low compared to the music volume. Both streams are treated as media, so I can't adjust the volume of one relative to the other.
There's also no volume control in the CarPlay settings.
I haven't found an app that can manage media volume individually by app (the menu SoundMaster of ShizuTools does not open and Volume manager needs Android 13 but my device is 12).

So my idea was to use Tasker to know which app is streaming and change the volume accordingly. Is there a way? I have tried with the event "Music track change" but it is never triggered.
Or I am open to any other idea that can fix my issue ?

Thanks in advance for your help :)

Chris Pque

unread,
Dec 29, 2025, 10:42:35 PM (13 hours ago) Dec 29
to Tasker
I don't know if this will work on non rooted but I use a combination of "dumpsys media.audio_flinger" and "dumpsys bluetooth_manager" on my rooted Android. 

Yoan

unread,
Dec 29, 2025, 10:46:05 PM (13 hours ago) Dec 29
to Tasker
Thanks for your answer 
Can you please give me more details, what event/action do you use? 

Chris Pque

unread,
Dec 29, 2025, 11:04:06 PM (12 hours ago) Dec 29
to tas...@googlegroups.com
Use "run shell" action. I tried and some can run without root. There are 3 command finally :

dumpsys media_session
dumpsys media.audio_flinger
dumpsys bluetooth_manager


FYI NovaLauncher (and other apps) can show the current app playing, maybe using Java API (Java function in Tasker) can work. Did you try ?

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tasker/973f0b93-d123-4bc0-bfc3-6eb7a679df07n%40googlegroups.com.

Chris Pque

unread,
Dec 29, 2025, 11:31:03 PM (12 hours ago) Dec 29
to tas...@googlegroups.com
I tried the "music track changed", it worked but some apps don't expose correctly the fact that they are playing media (example even YouTube when it's fourground). Maybe this is your issue. 

Also, on Android (I don't know since which version, probably 12 is OK) but when most apps are playing music there is a "audio session" notification that naturally appears. 

You can simply poll all your notifications to know if your app is focusing it's audio --> you dont need a plug-in I think but if you have "AutoNotification" plug-in it will be easier : you create an event, select AutoNotification as event and filter the notifications by selecting "only media session" check box. This should be OK for most use cases. 

On Tue, Dec 30, 2025, 04:46 Yoan <yoan...@gmail.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages