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 (79.57 KiB) Viewed 49381 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.