简体   繁体   中英

Calling a USSD number without opening the phone app in Android

I am trying to call a USSD number from my application like this:

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.

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:

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.

If the user is doing something, then he should not be disturbed. Only a notification must be generated.

any suggestions?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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