How to detect Whatsapp | Standard call ongoing on Android Auto?

1,106 views
Skip to first unread message

Alejandro Pérez

unread,
Mar 24, 2021, 6:33:19 AM3/24/21
to Tasker
Hi,

I'm scratching my head around this idea, but I'm unsure how to accomplish it.

I will use my car's steering wheel buttons for this coupled with an ESP32 and a CANBus transceiver to send bluetooth keyboard keys and media actions (2007 car)

I already managed to send bluetooth media actions with it (ESP32-BLE-Keyboard library), and was also able to send unused keyboard key commands like '0x80' (left CTRL key) and by using AutoInput plugin to intercept it, I was able to call Google Assistant.

However, what I'd like to do is determine whether car mode is active (AA app) and there's an incoming WhatsApp / standard call so I can send an accept call action. And also determine if the call is in progress, so be able to hang it up with the same button.

Is there a way to accomplish all this when using the Android Auto app?

Thanks in advance

jmjc...@gmail.com

unread,
Mar 24, 2021, 9:52:47 AM3/24/21
to Tasker
To detect a WhatsApp call, you can use the Notification or AutoNotification Intercept context. When a WhatsApp call comes in, a notification is created. The title will have the caller's name and the text will say "Incoming voice call".

Alejandro Pérez

unread,
Mar 24, 2021, 5:41:49 PM3/24/21
to Tasker
Hi, are you Joao, the developer of Tasker? Thanks for your reply.

I purchased AutoNotification today. I was successful detecting WhatsApp calls by means of the Intercept event. 
However, I was not lucky to make it Accept the calls with the AutoNotification Action task, which I configured as follows:

-Notification Apps: WhatsApp
-Text: Contestar (Answer in Spanish)

In spite of this, the task is executed but nothing really happens. It displays "Couldn't find an action to perform". It did work once or twice, though, without making any changes...which makes it more confusing and frustrating at the same time. 

I should also mention that this action task does work for me on other apps like Spotify (skipping songs by activating the Next song button on the notification), so it's not like I don't have a clue about what I'm doing!.

Lastly, I saw there's a log listing feature on AutoNotification but I don't think there's a way to share the whole log... 
Message has been deleted

jmjc...@gmail.com

unread,
Mar 24, 2021, 10:28:29 PM3/24/21
to Tasker
No, I am not Joao. Just another user.

I normally do it differently. See if my solution helps:

Use the same AutoNotification Action action. Leave all fields empty BUT go to Advanced > Intercept Action ID > and enter "%anbutton2action" (w/o the quotes). On my phone, button 2 is Answer and button 1 is Reject. Make sure it is the same on yours. Otherwise, you can use "%anbutton1action".

Alejandro Pérez

unread,
Mar 25, 2021, 11:22:45 AM3/25/21
to Tasker
Hi, I have new findings. I tried your suggestion but let me first explain the findings.

In my previous message I mentioned that the task worked once or twice. I found a way to trigger this odd behavior. For the next example I worked with the Missed called notification, which has the Llamar (Call) and Responder (Reply) buttons:

I created a missed called notification by calling from another number. Started screen recording https://youtu.be/rM71JUe1KIY. Then this is what happens:
1) I show the action details, and get into the edit Button text 
. Save the changes without making any modifications. Return to the task.
2) Run the task (00:28) : it works. The Llamar (Call) button is pressed  
3) I make another missed call (00:42) 
4) Re-run the task but it doesn't do anything no matter how many times I try.
5) I go back to editing the action without changing anything, save it.
6) Run task again and there you go! Worked.
7) Create another missed called, run task and it fails again...

TLDR: the action only works once, that is, right after saving the action. You need to resave the action to make it work once again.

About you offered solution, it's actually %anbutton2action()
However, either anbutton1 or  anbutton2 do the same thing as if I pressed on the notification not what I want! . But also, only works once after saving the action.

What is going on??
Android 11 phone running ArrowOS ROM, rooted phone. 

Danilo

unread,
Mar 29, 2021, 2:19:53 PM3/29/21
to tas...@googlegroups.com
I'm no expert but I've been using the AN plugin for some time now.
I would strongly recommend running a query task before running the action.
That way you can store the data you need in variables and act based on them.
I have several tasks working this way and never saw it failing.

Anyways, I would say it should have worked the way you set it up...

Danilo Oliveira.

--
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 on the web visit https://groups.google.com/d/msgid/tasker/d0d482bc-3dbe-429a-845c-92bc7f7d06d1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages