简体   繁体   English

在 Android 中无需打开手机应用即可拨打 USSD 号码

[英]Calling a USSD number without opening the phone app in Android

I am trying to call a USSD number from my application like this:我正在尝试从我的应用程序中调用 USSD 号码,如下所示:

Uri u = Uri.fromParts("tel", "*110#", "");
Intent i = new Intent(Intent.ACTION_CALL, u);
startActivity(i);

This makes the phone app launch and call the number.这将使电话应用程序启动并拨打该号码。

What I want is to call the USSD number without opening the phone app or atlease open it up in the background.我想要的是在不打开电话应用程序或在后台打开它的情况下拨打 USSD 号码

If the user is doing something, then he should not be disturbed.如果用户正在做某事,那么他不应该被打扰。 Only a notification must be generated.只需要生成通知。

any suggestions?有什么建议?

I am trying to call a USSD number from my application like this:我正在尝试从我的应用程序中拨打USSD号码,如下所示:

Uri u = Uri.fromParts("tel", "*110#", "");
Intent i = new Intent(Intent.ACTION_CALL, u);
startActivity(i);

This makes the phone app launch and call the number.这将使电话应用程序启动并拨打该号码。

What I want is to call the USSD number without opening the phone app or atlease open it up in the background.我想要的是在不打开电话应用程序的情况下拨打USSD号码,或者至少在后台打开它。

If the user is doing something, then he should not be disturbed.如果用户正在做某事,则不应打扰他。 Only a notification must be generated.仅必须生成一个通知。

any suggestions?有什么建议么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM