Most, if not all telecom company has USSD (Unstructured Supplementary Service Data) feature to assist customer subscribe, activate, create promo or package. Does automagic detect this? It is usually interactive, can automagic able to read it and response accordingly since the sms message is not stored locally and is only available when the session is started.
Thanks
Is USSD detected by Automagic
Moderator: Martin
Re: Is USSD detected by Automagic
Don't know, if there is some way to implement this faster, but here
https://stackoverflow.com/questions/220 ... d-response
you can use logcat information.
https://stackoverflow.com/questions/220 ... d-response
you can use logcat information.
All systems nominal.
Re: Is USSD detected by Automagic
Thanks for the link. I have initially checked it and I was looking for a solution leaning towards automagic since if it is possible I can interact based on the response of an interactive USSD.
Re: Is USSD detected by Automagic
Hi,
You can try to get the responses with trigger UI Event. You can also try to click OK with action Control UI.
There's no better way to interact with USSD since Android does not officially expose the API to handle responses.
Regards,
Martin
You can try to get the responses with trigger UI Event. You can also try to click OK with action Control UI.
There's no better way to interact with USSD since Android does not officially expose the API to handle responses.
Regards,
Martin
Re: Is USSD detected by Automagic
I tried to use the UI event but it seems unable to detect the USSD message box when I tried to "Show overlay control". Or am I doing it wrongly?
Re: Is USSD detected by Automagic
I can't access the USSD response as well, probably it is protected. You can check first using Trigger UI Event, leave the trigger opened and go to you dialer and dial the USSD. After the response appear, quickly back to automagic and tap Recent Events. You should can see the Package name and the text content from the several last event.
From there, you probably see "Cancel" and "Send". You can use Control UI, click("Cancel") to directly click cancel. But I still have no idea how to access the blank field. Maybe we need to decompile the resource of the apk to see the element of the blank field. You can use debug dialog to find out more about the USSD windows. At mine, it is
app_name : Phone
package_name : com.android.phone
source_class_name : android.app.AlertDialog
Later find this resources at the decompile apk and trace the blank field id, so we can use clickById() or set the text.
From there, you probably see "Cancel" and "Send". You can use Control UI, click("Cancel") to directly click cancel. But I still have no idea how to access the blank field. Maybe we need to decompile the resource of the apk to see the element of the blank field. You can use debug dialog to find out more about the USSD windows. At mine, it is
app_name : Phone
package_name : com.android.phone
source_class_name : android.app.AlertDialog
Later find this resources at the decompile apk and trace the blank field id, so we can use clickById() or set the text.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Is USSD detected by Automagic
There is a new hope in Android Oreo. It now has the API to access the USSD.
https://www.xda-developers.com/android- ... -carriers/
But of coz you should have Oreo first and wait for Automagic implementation.
https://www.xda-developers.com/android- ... -carriers/
But of coz you should have Oreo first and wait for Automagic implementation.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Is USSD detected by Automagic
Thanks for the link. I'll add the link to my todo-list to check if this actually works.
It seems that Automagic has to initiate the USSD code to get the response but that might not be a problem except when you start the USSD code in the regular dialer. Probably I will add an action Send USSD Request with a checkbox to optionally wait for the response which then populates a variables with the response and/or error code.
Regards,
Martin
It seems that Automagic has to initiate the USSD code to get the response but that might not be a problem except when you start the USSD code in the regular dialer. Probably I will add an action Send USSD Request with a checkbox to optionally wait for the response which then populates a variables with the response and/or error code.
Regards,
Martin
Re: Is USSD detected by Automagic
It seems that the new API does not work properly (at least on a Pixel XL with the current version of Oreo). The function has an error when the USSD code does not work so Android never invokes the callback of Automagic to inform Automagic about the failure so Automagic has no idea that the USSD request even finished. I'll still add an action to send the USSD request in the next version since I expect that most users will find the feature useful anyway and the request will work OK most of the time so the bug is not encountered in the usual case. I have some hopes that Google will fix the problem in an update so the action will start to work as expected when the bug is fixed in the ROM.
Regards,
Martin
Regards,
Martin