USSD Blocks and Call Blocks

44 views
Skip to first unread message

A

unread,
Jul 6, 2026, 3:02:35 AMJul 6
to Automate for Android
Dear Henrik,

Regarding USSD Blocks and Call Blocks:

1) Are they based on the Android's Telephony's API functions?

2) For USSD Blocks, is it using the Android's Telephony API function of the Call Dialler to dial the USSD code and call out?

3) Difference between USSD Blocks and Call Blocks is the return of the USSD status return is only available in USSD Blocks, whereas there is no USSD status return in the Call Blocks?

4) If there are failures, how to tell the failures are from Android's Telephony's side or from Telco's side?

5) Are failures always due to Telco's side (except for flight mode which arises due to no connections - i.e. connection off at the phone)?

6) Error from USSD and Call Blocks are only ""java.io.IOException: Request failed""? Or there are other types of errors for USSD and Call Blocks?

7) As such, error like "java.io.IOException: Request failed" arises due to the failure from the Telco side? Or due to Android's Telephony API's side?

Thanks.

A
 

Henrik "The Developer" Lindqvist

unread,
Jul 6, 2026, 2:05:30 PMJul 6
to Automate for Android
  1. The USSD request block is. The Call number block is just an intent that starts the "dialer" app.
  2. See #1
  3. Yes, that's correct.
  4. Sadly, not possible, since the Android API has no (official) specific error codes for it. 
  5. See #4
  6. Yes, for the USSD request block there's also "java.lang.IllegalStateException: Telephony service unavailable", and just in case of an undocumented failure "java.lang.RuntimeException: Unknown error: <number>"
  7. See #4

мJ ZЖУ

unread,
Jul 8, 2026, 8:57:45 AMJul 8
to Automate for Android
USSD failure if you try to call it too fast maybe add some delay while USSD menu load.

A

unread,
Jul 9, 2026, 10:19:33 AMJul 9
to Automate for Android
Thanks Henrik.

Does that mean  ""java.io.IOException: Request failed"" refers to failure due to Telco's end; and "java.lang.IllegalStateException: Telephony service unavailable" refers to failure due to Android Telephony's end?
If otherwise, what does these 2 errors refer to / mean?

Thus far had never encountered this   "java.lang.IllegalStateException: Telephony service unavailable" error before, even for flight mode being turned on.

A

unread,
Jul 9, 2026, 10:24:41 AMJul 9
to Automate for Android
Thanks  мJ ZЖУ.

Yes, did use delay block before which Henrik advised too. Thanks :)

Was trying to see if there is a way to differentiate the failure is due to what issues.

Henrik "The Developer" Lindqvist

unread,
Jul 9, 2026, 10:35:54 AMJul 9
to Automate for Android
As said, it's not really possible to tell. "Service unavailable" is probably a local issue, see Android documentation.
Reply all
Reply to author
Forward
0 new messages