【问题标题】:Run USSD Code in Android without using " Intent.ACTION_CALL"在 Android 中运行 USSD 代码而不使用“Intent.ACTION_CALL”
【发布时间】:2014-01-31 20:10:13
【问题描述】:

我正在 Android 中创建一个应用程序,它需要在后台运行 USSD 代码。 无需在后台发送我的应用程序,

每当我使用 Intent.ACTION_CALL 运行 USSD 时

   String encodedHash = Uri.encode("#");
   String ussd = "*123" + encodedHash;
   Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + ussd));
   startActivity(intent);

它在后台发送我的应用程序,并在我的应用程序上打开拨号界面。

因此可以在前面不打开拨号器接口的情况下运行 USSD 代码。

提前致谢。

【问题讨论】:

    标签: java android service android-activity


    【解决方案1】:

    这是一种复杂的... 您需要覆盖默认拨号程序。 就像 Skype 一样。 How to include my application as a dialing option when calling from the addressbook?

    Dial Number Without Prompt

    【讨论】:

    • 谢谢,我想使用一些固定的代码,所以我想我不需要拨号选项。
    猜你喜欢
    • 1970-01-01
    • 2018-08-30
    • 2020-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多