Page 1 of 1

Flow to Forward a Dialed number (use a Calling Card)

Posted: 01 Nov 2019 20:30
by CjoeX
I call some international numbers and wanted to automate it so those numbers are automatically forwarded to use a calling card I have. The flow would be if number is dialed with a "+". To end the call and redial the calling card number and then enter the number dialed after a couple of pauses. I am having a hard time ending the initial dialed call though. I tried it on MacroDroid and there is an option to end call which works. Ending the call as an action on Automagic doesn't. I've tried the workaround and it still seems not to work. Am I missing something? I have an s9+ running Pie.

Re: Flow to Forward a Dialed number (use a Calling Card)

Posted: 03 Nov 2019 18:47
by Desmanto
Ending call sometimes require root on some devices. The other method that guarantee to work properly is to use Control UI, find the element ID which correspond to the end call button and click it. The device screen should in ON state, because control UI only works when the screen is ON.

Re: Flow to Forward a Dialed number (use a Calling Card)

Posted: 04 Nov 2019 00:06
by CjoeX
Interesting. How does Macrodroid accomplish it wihtout root? For the ControlUI route, but how do I find the element id for the end call button? Thanks.

Re: Flow to Forward a Dialed number (use a Calling Card)

Posted: 05 Nov 2019 18:45
by Desmanto
Maybe macrodroid also use the Control UI method, but it has hardcoded several element Id known for most phones.
To find the element Id, you need to use the control UI overlay. Look at my tutorial here : viewtopic.php?f=6&t=7320