在Android中运行USSD代码而不使用“ Intent.ACTION_CALL" [英] Run USSD Code in Android without using " Intent.ACTION_CALL"

查看:572
本文介绍了在Android中运行USSD代码而不使用“ Intent.ACTION_CALL"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am creating a App in Android, which required run USSD Code in background. without send my application in background,

每当我使用Intent.ACTION_CALL运行USSD

Whenever I am using Intent.ACTION_CALL to run USSD

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

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

it send my application in background, and open dialer Interface on my application.

因此可以在没有打开Dialer Interface的情况下运行USSD代码。

So it is possible to run USSD code without open Dialer Interface in front.

提前谢谢。

推荐答案

这是一种复杂的...
您需要覆盖默认拨号器。
和Skype一样。
如何在通过地址簿拨打电话时将我的应用程序作为拨号选项包括在内?

It's a kind of complex... You need to override the default dialer. Like the way Skype does. How to include my application as a dialing option when calling from the addressbook?

没有提示的拨号号码

这篇关于在Android中运行USSD代码而不使用“ Intent.ACTION_CALL"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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