KZero Active Member Licensed User Longtime User Aug 7, 2011 #1 Hello, is it possible to send and recieve USSD commands and results ? thanks in advance
Erel B4X founder Staff member Licensed User Longtime User Aug 8, 2011 #3 It is not possible to receive USSD commands in Android. You can send with the following code: Code: Copy 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 Upvote 0
It is not possible to receive USSD commands in Android. You can send with the following code: Code: Copy 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
KZero Active Member Licensed User Longtime User Aug 8, 2011 #4 Erel said: It is not possible to receive USSD commands in Android. You can send with the following code: Code: Copy 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 Click to expand... thx m8 it did the job Upvote 0
Erel said: It is not possible to receive USSD commands in Android. You can send with the following code: Code: Copy 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 Click to expand... thx m8 it did the job
P parag New Member Licensed User Longtime User Nov 19, 2011 #5 Erel said: It is not possible to receive USSD commands in Android. You can send with the following code: Code: Copy 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 Click to expand... The above piece of code throws errors when StartActivity(i) line is to be executed. The error is about CALL_PHONE permission required. Error snapshot is attached. Attachments error.jpg 15.6 KB · Views: 1,050 Upvote 0
Erel said: It is not possible to receive USSD commands in Android. You can send with the following code: Code: Copy 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 Click to expand... The above piece of code throws errors when StartActivity(i) line is to be executed. The error is about CALL_PHONE permission required. Error snapshot is attached.
Erel B4X founder Staff member Licensed User Longtime User Nov 20, 2011 #6 Add a reference to the Phone library and add: Code: Copy Dim PhoneCalls As PhoneCalls It will add the required permission. Upvote 0
Add a reference to the Phone library and add: Code: Copy Dim PhoneCalls As PhoneCalls It will add the required permission.
P parag New Member Licensed User Longtime User Nov 20, 2011 #7 Erel said: Add a reference to the Phone library and add: Code: Copy Dim PhoneCalls As PhoneCalls It will add the required permission. Click to expand... Thanks. Upvote 0
Erel said: Add a reference to the Phone library and add: Code: Copy Dim PhoneCalls As PhoneCalls It will add the required permission. Click to expand... Thanks.
IanMc Well-Known Member Licensed User Longtime User Aug 26, 2013 #8 Oh wow! I am so loving B4a right now Upvote 0