When I dial a directly from the handset it works. For example: *123# gets balance of number.
However, when I try to do the same thing from within an application I ge
String encodedHash = Uri.encode("*123#");
startActivityForResult(new Intent("android.intent.action.CALL",
Uri.parse("tel:" + encodedHash)), 1);
I'm not completely sure but I think USSD is not yet supported on android, however you can try this workaround:
String encodedHash = Uri.encode("#");
String ussd = "*" + encodedHash + "123" + encodedHash;
startActivityForResult(new Intent("android.intent.action.CALL",
Uri.parse("tel:" + ussd)), 1);