Page 1 of 1

Check if call forwarding *21*<number># is active

Posted: 06 Mar 2017 07:16
by softmonaut
Dear community,

how to check if call forwarding *21*<anynumber># is active?
How do I confirm the dialog displayed when enabling/disabling call forwarding (UI action, click("OK") ??) ?.

Thx
Jörg

Re: Check if call forwarding *21*<number># is active

Posted: 07 Mar 2017 20:58
by Martin
Hi,

Confirming the dialog with click("OK") could work. Maybe back() also works.
To my knowledge there's no good way to get the current status. You could try to dial *#21# or *#67# (check here: https://en.wikipedia.org/wiki/Call_forwarding) and then use action Control UI with function getTextInActiveWindow() to read the response in the opened dialog.
Alternatively you could try to open the call forwarding settings page of the phone app and read the current status using Control UI from there.

If you enable/disable the call forwarding always from Automagic, you could store the current state in a global variable and then check this variable when required.

Regards,
Martin