String encodedHash = Uri.encode("#");
String ussd = "*" + encodedHash + "105" + encodedHash;
startActivityForResult(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussd)), 1);
This calls the USSD and the result is displayed in an alert menu generated by the OS dialer. There's no way that I can see to intercept the USSD reply, prevent the dialer displaying it, and then use the result as a String. Essentially, all I really want to do is (pseudo code)
String ussdReply = call("*#105#");
I've tried creating an onActivityResult
but it never receives anything from the startActivityForResult
. So, does anyone know how I can use the reply within an application???