发送USSD code的Android [英] sending USSD code Android
本文介绍了发送USSD code的Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过我的手机发送USSD code,所以我用了一个意图尽可能多的建议在这里是发送code的方式。不幸的是,每次我送code发送相同数量* 4355696753
I'm trying to send a USSD code through my cellphone, so I used an intent as many here suggested is the way to send the code. Unfortunately, every time I send the code it sends the same number *4355696753
在code我用发送USSD是:
the code I'm using to send the USSD is:
sendCode.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
String cUssd = ussdCodeEdTxt.getText().toString();
String cToSend = "tel:*" + cUssd + Uri.encode("#");
startActivityForResult(new Intent("android.intent.action.CALL",
Uri.parse(cToSend)), 1);
}
});
任何想法将不胜pciated AP $ P $
any ideas would be greatly appreciated
推荐答案
我想你可能需要使用Uri.en code(*)的明星以及
I think you may need to use Uri.encode("*") for the star as well
送code.setOnClickListener(新View.OnClickListener(){
sendCode.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
String cUssd = ussdCodeEdTxt.getText().toString();
String cToSend = "tel:" + Uri.encode("*") + cUssd + Uri.encode("#");
startActivityForResult(new Intent("android.intent.action.CALL",
Uri.parse(cToSend)), 1);
}
});
这篇关于发送USSD code的Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文