-1

How can i launch ##xxxx## code with B4A?

Here is my code:

Dim st,stt As String
Dim su As StringUtils
Dim ph As Intent

st = "#"
stt = su.EncodeUrl(st,"UTF8")
Dim ussd As String = "*"&stt&"3646633"&stt&"*"stt&"*"
ph.Initialize(ph.ACTION_CALL,"tel:"&ussd)
StartActivity(ph)

After launching the app, it only showed the dialer. I want to launch engineering mode directly.

peacetype
  • 1,928
  • 3
  • 29
  • 49

1 Answers1

1

You can't. ANdroid does not support USSD codes. There's ways to do it on certain models of phones, but nothing that's universal. USSD should be avoided anyway, its a legacy technology that was meant for the world before data plans.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
  • This app lunch engineering mode directly on buttonClick https://apkpure.com/mtk-engineering-mode/com.themonsterit.EngineerStarter – Thet Htwe Dec 31 '17 at 05:24
  • THere is no way that works across all devices. USSD is not supported. You may find a hack that works on some device and some dialers, but it is NOT possible to work generally. – Gabe Sechan Dec 31 '17 at 05:24
  • In addition, the codes themselves are not the same across all networks, or all OEMs. – Gabe Sechan Dec 31 '17 at 05:26