Sub Activity_Create(FirstTime As Boolean)
Call("*#123#")
End Sub
Sub Call(Command As String)
Dim i As Intent
i.Initialize(i.ACTION_CALL, "tel:" & Command.Replace("#", "%23"))
StartActivity(i)
End Sub
It is not possible to receive USSD commands in Android. You can send with the following code:
B4X:Sub Activity_Create(FirstTime As Boolean) Call("*#123#") End Sub Sub Call(Command As String) Dim i As Intent i.Initialize(i.ACTION_CALL, "tel:" & Command.Replace("#", "%23")) StartActivity(i) End Sub
It is not possible to receive USSD commands in Android. You can send with the following code:
B4X:Sub Activity_Create(FirstTime As Boolean) Call("*#123#") End Sub Sub Call(Command As String) Dim i As Intent i.Initialize(i.ACTION_CALL, "tel:" & Command.Replace("#", "%23")) StartActivity(i) End Sub
Add a reference to the Phone library and add:
It will add the required permission.B4X:Dim PhoneCalls As PhoneCalls