Intent.ACTION后的第一次#号不拨 [英] Intent.ACTION does not dial after first # sign
本文介绍了Intent.ACTION后的第一次#号不拨的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图与一个长的数字,看起来像这样的电话。
I am trying to make a call with a long number that looks something like this.
电话:883994555 ,,, 32343#,,,#
tel:883994555,,,32343#,,,#
与code,它看起来是这样的。
with code that looks like this.
Intent intent = new Intent(Intent.ACTION_CALL);
Uri uri = Uri.parse(number);
intent.setData(uri);
startActivity(intent);
我看到的是,手机不第一个#后感叹拨号。任一项知道如何使这个工作。
What I see is that, the phone does not dial after the first '#' sigh. Any one knows how to make this to work.
感谢。
推荐答案
我如何得到这个工作是使用; (分号)用于硬等待而不是'W',和','(逗号),用于暂停,然后连接$ C C的电话号码$第一,这样的 -
How I got this to work was to use ';' (semicolon) for the hard wait instead of the 'w', and ',' (comma) for the pause, and then encode the phone number first, like this -
Uri.parse(String.format("tel:%s", Uri.encode(number)))
这篇关于Intent.ACTION后的第一次#号不拨的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文