Sending USSD Codes from my LiveCode App to my Mobile Phone Carrier
Posted: Thu Aug 27, 2020 2:06 am
I am having a challenge in trying figure out how to send USSD codes in the background to the local mobile phone carrier (in this case, Digicel) and then getting the response and displaying for the user in the App.
Instead of the user going through and punching in all the number sequence for each text/message based menu, I want to "automate" the process where the user can just press a menu on the app, and all the sequences are taken care in the background and the result is displayed on the app.
I tried using the: (translation: "*120#)
But it only solves one problem. It loads the number and the keypad shows up but does not automatically dial the number (I am checking the android permissions to make sure "android.permission.CALL_PHONE" returns true. Still, it does not auto dial.
Secondly, it only accepts the first sequence of numbers. I want it to go through the whole sequence, for example like:
This should return the final response from the carrier which I can display to the user.
The asterisks separate the string number sequence required to dial USSD codes per online documentations. However, this gives an error using this approach. The cell phone provider does not accept this.
Summary
1. How do I launch my phone number and then automatically dial the USSD code?
Possible Solutions
Solution 1. Is it possible to simulate a mouse click like
If that is the case, how can I find the location of the dial pad and position of each number on the pad. How can I leverage LiveCode to find the location and the simulate mouse clicks, and dial.
Solution 2. Any easier insights/third party insights from experiences/expert android developers.
On a side note, while researching, I found something called "LiveSend" but the url links are not working: https://messaging.livecode.ae
Anyone know, what happened to LiveSend and is there another valid link for this? This looks exactly like something I need to read up on.
Thank you all so much!
Instead of the user going through and punching in all the number sequence for each text/message based menu, I want to "automate" the process where the user can just press a menu on the app, and all the sequences are taken care in the background and the result is displayed on the app.
I tried using the: (translation: "*120#)
Code: Select all
)
put "tel:*120%23" into tNum
launch url tNum
Secondly, it only accepts the first sequence of numbers. I want it to go through the whole sequence, for example like:
Code: Select all
put "tel:*120%23*1*2*!" into tNum
launch url tNum
The asterisks separate the string number sequence required to dial USSD codes per online documentations. However, this gives an error using this approach. The cell phone provider does not accept this.
Summary
1. How do I launch my phone number and then automatically dial the USSD code?
Possible Solutions
Solution 1. Is it possible to simulate a mouse click like
Code: Select all
click at <loc>
Solution 2. Any easier insights/third party insights from experiences/expert android developers.
On a side note, while researching, I found something called "LiveSend" but the url links are not working: https://messaging.livecode.ae
Anyone know, what happened to LiveSend and is there another valid link for this? This looks exactly like something I need to read up on.
Thank you all so much!