拨号与Intent.ACTION_CALL stopps在#在电话号码 [英] Dialing with Intent.ACTION_CALL stopps at # in phone number

查看:138
本文介绍了拨号与Intent.ACTION_CALL stopps在#在电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试拨打的电话号码03012345,1234,#31#,98765
(电话接通率与FRITZ!盒)

I try to dial the phone number 03012345,1234,#31#,98765 (callthrough with a FRITZ!Box)

03012345是弗里茨!盒,电话号码,被拨停顿,#31#是preFIX展现我自己的电话号码给被叫和98765是PHONENUMBER的被叫方。

"03012345" is the phone number of the FRITZ!Box, "," are dial pauses, "#31#" is a prefix to show my own phone number to the callee and "98765" is the phonenumber of the callee.

String phonenumber = "03012345,1234,#31#,98765";
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phonenumber)));

在我的智能手机,一切工作正常,但有些用户向我报告,第一#后,他们的智能手机STOPP拨号。但是,当他们从联系人拨号,它的工作原理。

On my smartphone, everything works fine, but some user reported to me, that their smartphones stopp dialing after the first #. But when they dial from contacts, it works.

也许, Uri.parse 打出的电话号码?还是有另一种方式来拨打这样的电话号码吗?

Maybe, Uri.parse splits the phone number? Or is there another way to dial such a phone number?

推荐答案

下面是解决方案:

String phonenumber = "03012345,1234,#31#,98765"; // , = pauses
encodedPhonenumber = URLEncoder.encode(phonenumber, "UTF-8");
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + encodedPhonenumber)));

您只需要连接code的电话号码。

You simply have to encode the phone number.

这篇关于拨号与Intent.ACTION_CALL stopps在#在电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆