1

I am building an android application where I am calling an USSD number. I am writing a java code for phone calls and it is taking the default SIM Slot saved in settings.

Now the problem occurs in DUAL SIM when I want to call from SIM SLOT 2 programmatically.

I googled a lot and I have the below code but it is working on Samsung phone only.

Intent intent = new Intent(Intent.ACTION_CALL);
intent.putExtra("com.android.phone.extra.slot", 1); //For sim 2
intent.putExtra("simSlot", 1); //For sim 2
intent.setData(Uri.parse("tel:" + "**********"));

Is there a standard code which will work on all android phone? I just checked true balance and they are doing that, can anyone show me how are they doing that?

f-CJ
  • 4,235
  • 2
  • 30
  • 28
Hitesh Matnani
  • 309
  • 1
  • 5
  • 20

0 Answers0