I want to call a USSD (http://en.wikipedia.org/wiki/USSD) command and
have the reply returned as a String.

I can make the device automatically dial the USSD - like so

//
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?

Thanks

T

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to