发送ACTION_CALL意图在Android中包含的哈希#号 [英] Sending ACTION_CALL Intent in Android containing hash # sign

查看:142
本文介绍了发送ACTION_CALL意图在Android中包含的哈希#号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有该井号被截断的问题。是否有人知道一个解决方案吗?使用UNI code或23%,不工作在我的情况。现在正在拨打的号码是* 101

 字符串的uri =电话:+* 101#;

//字符串URI =电话:+* 101 \ u0023;

意向意图;
意图=新的意图(Intent.ACTION_CALL,Uri.parse(URI));
 

解决方案

找到了解决办法:字符串连接codedHash = Uri.en code(#);这样做有...

I am having the problem that the hash sign is truncated. Does anybody know a solution? using unicode or %23 is not working in my case. Now the number that is dialed is *101

String uri = "tel:" + "*101#";

//String uri = "tel:" + "*101\u0023";

Intent intent;
intent = new Intent(Intent.ACTION_CALL, Uri.parse(uri));

解决方案

Found a solution: String encodedHash = Uri.encode("#"); this did the trick...

这篇关于发送ACTION_CALL意图在Android中包含的哈希#号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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