WhatsUp auto accept a call

Post your questions and help other users.

Moderator: Martin

iam
Posts: 3
Joined: 29 Dec 2019 21:36

WhatsUp auto accept a call

Post by iam » 01 Jan 2020 16:13

Hello

Has anyone tried auto accept a call in WhatsUp?
After the specified number of rings.

This is for the handsfree in the car.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: WhatsUp auto accept a call

Post by Desmanto » 01 Jan 2020 17:57

Yes, it is possible, using control UI. You can check the name/number of the caller and decide whether to automatically answer, reject or leave it alone. I can't test the flow right now, I will try it tomorrow to have someone call me first.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

iam
Posts: 3
Joined: 29 Dec 2019 21:36

Re: WhatsUp auto accept a call

Post by iam » 02 Jan 2020 09:55

Thanks, I will try.

I'm new to this, do I need to use "incoming call" as a trigger?

And how can I calculate the number of rings (or better use delay)?

ps: The "incoming call" does not seem to detect a WhatsUp call.
And to accept the call, you need to move the slider up (it is not yet clear how this is done).

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: WhatsUp auto accept a call

Post by Desmanto » 02 Jan 2020 17:50

Sorry, I make it more complicated. I tested it out, and it is actually way easier than I thought. You don't have to use Control UI if you don't need the extra step.
Whatsapp Auto Answer.png
Whatsapp Auto Answer.png (79.57 KiB) Viewed 49744 times
- Just use trigger Notification on Statusbar Displayed, filter for text contain "Incoming voice call".
- Then put a list of the caller name, exactly as they would should up (case sensitive) into a list.
- Check if the caller is in the auto answer list, then wait for 5 seconds.
- If they are still calling, then Perfoma notification on Statusbar, click button "Answer".
Up to here, you only need to grant Automagic Notification Access permission.

There is no control UI until this step. But as you use this in car, you might need to turn on speaker phone too (if you don't connect it to your car bluetooth). So the last element is Control UI, to click the speakerphone. (you can remove this element if you don't need it.) You need turn on Accessibility services for Automagic for Control UI.


Download the flow :
Whatsapp Auto Answer
- Make changes to the expression and put the names you want to have it auto answered. The name must be exactly as what you have saved in the contact, case sensitive. I believe you don't want to auto answer for unknown number, so the list should have proper names already.
- Change the sleep duration to your need. If you want it to auto answer as soon as they call, you can remove both sleep and the condition notification on statusbar displayed. The flow will be shorter.
- Remove the control UI if you don't need speaker phone (if you have use bluetooth headset/car's bluetooth speaker)
- Remember to enable the flow only when needed. You don't want to enable it all day long. Your auto answer list might call you at any time, get answered automatically and can sniff your conversation. So maybe coupled this with another flow to detect you are in car, such as bluetooth device connected - your car's bluetooth speaker to enable the flow. Then bluetooth device disconnected again to disable the flow.


As to answer your post :
- You can't use incoming call trigger, as that only trigger on common cellular phone call. Whatsapp call is an app notification, not real call. Because whatsapp is 3rd party app, same as other chat/call app such as telegram, line and other. The difference is if you turn on DND (Do Not Disturb), whatsapp call will be suppressed completely; but cellular phone call will still give notification. This gives you the idea how the system treat cellular phone call compared to 3rd party app call notification.
- Better use delay in seconds (sleep) as I show in the flow
- To slide up, we can use control UI to perform slide up using touchGesture() on the whatsapp calling interface. But using perform notification on statusbar is much more reliable, as it can even accept the call when the main whatsapp call UI is not shown up.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

iam
Posts: 3
Joined: 29 Dec 2019 21:36

Re: WhatsUp auto accept a call

Post by iam » 02 Jan 2020 18:41

Thank you very much, everything works.

Conrad
Posts: 4
Joined: 16 May 2020 16:18

Re: WhatsUp auto accept a call

Post by Conrad » 18 May 2020 10:32

Hi Desmanto,

I am trying to do a similar thing for my gran regarding video calling but can’t get it to work. Any chance you could help?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: WhatsUp auto accept a call

Post by Desmanto » 23 May 2020 19:41

@Conrad : You can use the same flow, except you only need condition Notification on Statusbar Displayed and Perform action on Notification on Statusbar.
The filter text is "Incoming video call". Then the same action "Answer".

Changed the trigger to something else, example Hardware keyevent : Volume Down. You might need to create another flow to enable/disable this flow when there is incoming video call only.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

bobeurone
Posts: 18
Joined: 15 Jul 2020 15:09

Re: WhatsUp auto accept a call

Post by bobeurone » 15 Jul 2020 20:45

Desmanto wrote:
23 May 2020 19:41
@Conrad : You can use the same flow, except you only need condition Notification on Statusbar Displayed and Perform action on Notification on Statusbar.
The filter text is "Incoming video call". Then the same action "Answer".

Changed the trigger to something else, example Hardware keyevent : Volume Down. You might need to create another flow to enable/disable this flow when there is incoming video call only.
@Desmanto Hello, I have the same ask as conrad to automate answer both for classical audio phone call and Whatsapp video call. I took the flow you shared above and replaced incoming voice by incoming video. Is that sufficient to answer video call?

What do you mean exactly by: except you only need condition Notification on Statusbar Displayed and Perform action on Notification on Statusbar.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: WhatsUp auto accept a call

Post by Desmanto » 18 Jul 2020 15:57

@bobeurone : For normal phone call, you can use action answer Ringing call instead, it should be more reliable.
For Whatsapp call, yes simply replace voice to video, to auto answer video call.
My flow is for auto answer

For my post here
Desmanto wrote:
23 May 2020 19:41
@Conrad : You can use the same flow, except you only need condition Notification on Statusbar Displayed and Perform action on Notification on Statusbar.
This mean for the flow which use other trigger, (not trigger Notification on Statusbar Displayed), such as trigger hardware keyevent. Someone might want to use the volume key to answer video call instead, so they use this trigger instead. But Perform action on Notification on Statusbar can only work if there is trigger/condition Notification on Statusbar Displayed before it, hence it require that condition. (since the trigger hardware keyevent doesn't provide it).
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

bobeurone
Posts: 18
Joined: 15 Jul 2020 15:09

Re: WhatsUp auto accept a call

Post by bobeurone » 19 Jul 2020 22:45

@Desmanto, I finally suceeded answering WhatsApp calls either voice or video after translating text filters and answer button in french.
That's really cool and I hope this will dramatically help my senior dad.

Is there any way to send SMS or email or WhatsApp message from a flow? I'd like to monitor incoming calls for security purpose.

Post Reply