2013-10-30 37 views
1

我想拨一个特殊号码一样如何在android中进行特殊调用并获得结果?

* 123#

这是一个网络请求并获得通过网络发送的结果。

这可能吗?我该怎么做?

+4

电话号码,你真的希望是/否回答? –

+0

[可能在Android上执行USSD请求的可能性重复?](http://stackoverflow.com/questions/5477597/how-is-it-possible-to-do-do-ussd-requests-on-android) –

回答

0

是的,你可以这样做:

Intent calling=new Intent(Intent.ACTION_CALL); 

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

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

startActivity(calli); 

注:

这里PHNOString包含如* 123#或123456789

+0

实际的答案在于[Mohsen Afshin的评论](http://stackoverflow.com/questions/5477597/how-is-it-possible-to-do-do-ussd-requests-on-android)。 – rtuner

相关问题