Skip to content Skip to sidebar Skip to footer

How Do I Give The User The Choice Of Programs With Which Sim Card To Call?

Wrote a little program, when you click on the number of calls, and all would be well in this tale, but tested it on another phone, and when you just departed from the program, but

Solution 1:

Do this:

Intenti=newIntent(Intent.ACTION_CALL)
                .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

// set active SIM
i.putExtra("simSlot", SimIndex); // <-------------------

i.setData(Uri.parse("tel:" + phone));

startActivity(i);

Where SimIndex is 0 or 1 for first & second SIM cards, respectively.

On some devices the SIM setting line will be:

// set active SIMi.putExtra("com.android.phone.extra.slot", SimIndex)

You would probably want to create a fallthrough mechanism that start with the prior way and, if fails, attempts the latter.

Hope it helps.

Post a Comment for "How Do I Give The User The Choice Of Programs With Which Sim Card To Call?"