Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dial USSD code?

Tags:

android

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 get a problem. The number displayed in the dialer is missing the ending #. I need it in my application i want my app should support all the USSD codes.

Is there any way to dial ussd codes with in the application?

like image 550
Shankar Agarwal Avatar asked Apr 18 '12 17:04

Shankar Agarwal


People also ask

What does it mean when your phone says USSD code?

Unstructured Supplementary Service Data (USSD)—sometimes known as "quick codes" or "feature codes"—is an extra-UI protocol, which allows people to access hidden features.

What is the use of * * 4636 * *?

Android code: *#*#4636#*#* This code will open up a menu that shows information about your phone's data usages.

How do I know my USSD code?

To do that, dial *3001#12345#* and call the number. Here, you can view information about your SIM card and your phone. Learn about other USSD codes.

What is USSD example?

Examples of USSD commands are *225# and #225# — the respective balance inquiries for AT&T and T-Mobile users. On mobile devices, the commands are typed and sent within the standard interface for calls.


1 Answers

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);
like image 78
ᴘᴀɴᴀʏɪᴏᴛɪs Avatar answered Nov 04 '22 08:11

ᴘᴀɴᴀʏɪᴏᴛɪs