Lazarus

Programming => Operating Systems => Android => Topic started by: Segator on July 14, 2020, 04:16:36 pm

Title: LAMW USSD code support [SOLVED]
Post by: Segator on July 14, 2020, 04:16:36 pm
Thanks a lot for the LAMW project, its posible to request USSD code using the jTelephonyManager or other componet?, USSD is like a call but is for special things with the phone company or internal command, an example is *222# but is i try it with jTelephonyManager hi try to call to *222, miss the # char.
Title: Re: LAMW USSD code support
Post by: Thyphoon on July 14, 2020, 05:17:02 pm
I did some investigation on this some time ago, and only since some recent changes from Google there wasnt a reliable way of doing this, this method worked on some devices:

https://stackoverflow.com/questions/22057625/prevent-ussd-dialog-and-read-ussd-response

Now for Oreo and up there is:
https://developer.android.com/reference/android/telephony/TelephonyManager.UssdResponseCallback

I dont think it will work LAMW but maybe someone with more knowleage can confirm it.
Title: Re: LAMW USSD code support
Post by: jmpessoa on July 14, 2020, 06:00:17 pm
Quote
Now for Oreo and up there is....


I will try add  ussd support to LAMW....  obviously it will only work for recent cell phones....
(Oreo/26 and higher API)

Thanks to All!
Title: Re: LAMW USSD code support
Post by: Segator on July 14, 2020, 07:30:13 pm
I did some investigation on this some time ago, and only since some recent changes from Google there wasnt a reliable way of doing this, this method worked on some devices:

https://stackoverflow.com/questions/22057625/prevent-ussd-dialog-and-read-ussd-response

I am ok with the ussd dialog, the problem is execute it.

Quote
I will try add  ussd support to LAMW....  obviously it will only work for recent cell phones....
(Oreo/26 and higher API)

Thanks to All!

it's ok if the USSD dialog must show for older phones, can you add normal USSD request for all phones and the hide dialog for recents moviles?

Thanks for the replys.
Title: Re: LAMW USSD code support
Post by: jmpessoa on July 18, 2020, 07:05:52 am

Done!

NEW jUSSDService Component!

New demo "AppUSSDServiceDemo1"

Now we have a start point!

based here:
https://stackoverflow.com/questions/22057625/prevent-ussd-dialog-and-read-ussd-response

Thanks to All!
Title: Re: LAMW USSD code support
Post by: Segator on July 19, 2020, 03:50:24 pm
Thanks a lot, is only for API 26 > ?
Title: Re: LAMW USSD code support
Post by: jmpessoa on July 19, 2020, 07:40:35 pm

No!

But need tests  and improvements....
TinyPortal © 2005-2018