【问题标题】:Android phone call including comma and hash #Android 电话呼叫,包括逗号和哈希 #
【发布时间】:2015-04-18 06:04:14
【问题描述】:

我需要用这两个字符(逗号和哈希)制作自动电话应用程序。

我尝试使用这种方法。如果是这样,哈希后面的所有字符都不会被调用。

    Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" +"131#3131,,,44"));
    startActivity(intent);

所以,我再次尝试使用此方法。然后,不调用逗号后面的所有数字。我可以知道怎么做吗?

    Intent out = new Intent();
    out.setAction(Intent.ACTION_DIAL);
    out.setData(Uri.parse("tel:" + Uri.encode("+3943#333,,23")));
    startActivity(out);

【问题讨论】:

  • Android 问题跟踪器 - code.google.com/p/android/issues/detail?id=7993 上有一个与此相关的问题。猜猜这是您看到的预期行为。
  • 哦...所以,无法修复? :O 还是其他方式?我也可以使用其他类似的字符或方法。 (如果有的话)
  • 也许有人有解决方法 - 但很多时候,如果存在这种情况,它们也会在错误报告中提及。
  • 谢谢。看起来这个应用程序正在运行。 play.google.com/store/apps/…我想知道他们是如何克服的。

标签: android hash tel


【解决方案1】:

这是答案(复制)

Uri.parse(String.format("tel:%s", Uri.encode(number)))

来源Intent.ACTION does not dial after first # sign

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多