Trigger for Android Auto

Osbornsm

New member
Tried USB device connected.
Tried application launched.
Is there a way to get Macrodroid to recognize plugging into a AA car receiver?

Thank you!
- Sean
 

MacroDroidDev

Administrator
Staff member
I don't really know what happens when you plug into an AA car receiver, but is there any kind of notification that is displayed, if so you should be able to use the Notification Received trigger.
 

Syncr0s

New member
Osbornsm,

Can I ask how you got this setup and working? I am trying to replicate the same, but the trigger never seems to be activated.

I've tried setting the notification "Connected to your car" and "Tap to exit driving app." for the Android Auto and for Android System respectively, as well as for "Any Application", and neither seem to be triggered. I have added a widget button trigger which I can active without issue.

I've tried connecting with the phone unlocked, as well as locked.

I've already enabled access to notifications for Macrodroid, and rebooted several times to ensure the permission is active.

My phone is a Xiaomi 9T (same as the Redmi 6??) and I'm running the latest available OS (12.0.9.0) as well as Macrodroid application.

Syncr0s.
 

Swap_File

New member
I don't really know what happens when you plug into an AA car receiver, but is there any kind of notification that is displayed, if so you should be able to use the Notification Received trigger.

I don't know how hard it would be to implement, but this is a code snippet from the Android Auto documentation:

Pretty sure this is how Tasker updates %UIMODE

I've been doing a lot of Android Auto macro testing with Headunit Reloaded on an old Android phone with an OTG cable, faking being a car stereo, and something like this would be handy, either as a trigger or a condition or both.
 

Swap_File

New member
FYI: I did some logcat exploring last night, and found on my Android 12 phone both CAR.SERVICE and CAR.SERVICE.LITE have good "CONNECTED" and "DISCONNECTED" events you can use as triggers for detecting android auto starting and stopping.
 

Endmost

New member
Hi Swap_File,
Can you talk a bit further of how to work it out with CAR.SERVICE event. I am a newbie of MacroDroid and still learning how to make it more beneficial.

Endmost
 

Swap_File

New member
If your on android 12 or older, you can detect Android auto via logcat messages.

If your on Android 13 or newer, log cat is now blocked, and I had to switch to detecting the android auto notification.
 

OscariBot

Active member
Osbornsm,

Can I ask how you got this setup and working? I am trying to replicate the same, but the trigger never seems to be activated.

I've tried setting the notification "Connected to your car" and "Tap to exit driving app." for the Android Auto and for Android System respectively, as well as for "Any Application", and neither seem to be triggered. I have added a widget button trigger which I can active without issue.

I've tried connecting with the phone unlocked, as well as locked.

I've already enabled access to notifications for Macrodroid, and rebooted several times to ensure the permission is active.

My phone is a Xiaomi 9T (same as the Redmi 6??) and I'm running the latest available OS (12.0.9.0) as well as Macrodroid application.

Syncr0s.

like @MacroDroidDev had said... All you have to do is figure out the notification you get when plug to AA car receiver, then harvest this notification and use as your trigger.
 

Endmost

New member
If your on android 12 or older, you can detect Android auto via logcat messages.

If your on Android 13 or newer, log cat is now blocked, and I had to switch to detecting the android auto notification.
I am on android 13. It works for me to detect the notification when AA is connected, but I cannot fine a good way to trigger when it is disconnected. I am using the unplugging power cord as an alternative for now, but it would get triggerred when I am just unchargging.
 
Top