1

I want to dial a special number like

*123#

which is a network request and get result sent by network.

Is this possible? How can I do it?

Anchit Mittal
  • 3,412
  • 4
  • 28
  • 48
rtuner
  • 2,362
  • 3
  • 25
  • 37

1 Answers1

0

Yes you can do this:

Intent calling=new Intent(Intent.ACTION_CALL);

if ( phno.contains( "#" ))
    phno = Uri.encode(phno+"#");

calling.setData(Uri.parse("tel:"+( phno ) ) );

startActivity(calli);

Note:

Here phno is String that contains phone number like *123# or 123456789

Chintan Rathod
  • 25,864
  • 13
  • 83
  • 93
Anchit Mittal
  • 3,412
  • 4
  • 28
  • 48
  • The actual answer lies in [Mohsen Afshin's comment](http://stackoverflow.com/questions/5477597/how-is-it-possible-to-do-ussd-requests-on-android). – rtuner Oct 30 '13 at 13:56