I am creating an Android application that requires running USSD code in the background. without sending my application in the background,
Whenever I use Intent.ACTION_CALL to start USSD
String ussdCode = "*" + "123" + Uri.encode("#"); startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussdCode)));
it sends my application in the background and opens the dialing interface in my application.
Thus, you can run the USSD code without the Dialer open interface.
Thanks.
source share