I am wondering about the possibility of making a phone call from android through a selected SIM on a dual SIM android devices. Is it possible to select a particular SIM to call through programmatically?
Asked
Active
Viewed 6,991 times
7
-
1Are you creating your own ROM mod and writing your own dialer? Or are you trying to use `ACTION_CALL`? If the latter, you cannot dictate what SIM the call goes through. – CommonsWare Feb 20 '13 at 17:22
-
There may be vendor specific APIs that provide this functionality. As far as I know, there is nothing in pure Android. – Henry Feb 20 '13 at 17:25
-
@CommonsWare Can you please explain me about ROM. Is it possible to make a call without using the Intent Action ACTION_CALL. Any suggestions would helpful. – Dinash Feb 20 '13 at 17:28
-
"Can you please explain me about ROM" -- by this I mean that you download the Android source code, change the behavior of the operating system, compile the results, and create a "ROM mod" to be installed on an Android device as a replacement for its existing copy of Android. "Is it possible to make a call without using the Intent Action ACTION_CALL" -- not from an SDK application. – CommonsWare Feb 20 '13 at 17:30
-
@CommonsWare Thanks for your kind information. Is there any specific APIs that are available as mentioned by Henry. – Dinash Feb 20 '13 at 17:46
-
"Is there any specific APIs that are available as mentioned by Henry" -- you are welcome to contact any device manufacturers you want yourself and ask them, as Raghav Sood points out in his answer. – CommonsWare Feb 20 '13 at 18:08
-
This answer worked for me [Make call using a specified SIM in a Dual SIM Device](http://stackoverflow.com/a/38605194/5224852) – Digvijay Chougale Mar 14 '17 at 06:35
-
Found a working solution [here](https://stackoverflow.com/questions/25524476/make-call-using-a-specified-sim-in-a-dual-sim-device/38605194#38605194). – Edie Kamau Jul 18 '21 at 09:17
-
Found a working solution answered [here](https://stackoverflow.com/questions/25524476/make-call-using-a-specified-sim-in-a-dual-sim-device/38605194#38605194) – Edie Kamau Jul 18 '21 at 09:19
5 Answers
4
The Android SDK doesn't provide an APIs to control the SIM being used on dual SIM mobiles. In fact, Android doesn't even really support dual SIM phones. All dual SIM devices are modified extensively by the manufacturers.
You cannot control the SIM through the Android SDK. If any OEM provides such an API for their devices, I am not aware of it, but you can try asking the manufacturer of your dual SIM device directly is such an API exists on their device.

Raghav Sood
- 81,899
- 22
- 187
- 195
0
private void callBack(String phone, Context context) {
Intent intent = new Intent(Intent.ACTION_CALL).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//check wheather it is dual sim or not then
//if sim 1
intent.putExtra("simSlot", 0);
//else if sim 2
intent.putExtra("simSlot", 1);
intent.setData(Uri.parse("tel:" + phone));
context.startActivity(intent);
}
Check it is dual sim or not, go through the bellow link

Community
- 1
- 1

Nitin Karale
- 789
- 3
- 12
- 34
-
Does this actually work for you? I'm trying it on 4.0.4 Galaxy S Duos and can't get it to wrok. – Talihawk Feb 18 '14 at 13:01
-
@Talihawk What is coming exactly or nothing?? But it is worked fine. I have done in my application. – Nitin Karale Feb 18 '14 at 13:57
-
0
If the phone is dual sim and you want to make call from sim2 then use 1 if you want to use sim1 then use 0 in intent.putextra
Intent intentcall = new Intent(Intent.ACTION_CALL);
intentcall.putExtra("simSlot", 1);
intentcall.setData(Uri.parse("tel:"+dialNumber));
startActivity(intentcall);

raghav
- 53
- 1
- 9
0
I was having the same problem and happened to walk through a solution at androidnoon and
intent.putExtra("com.android.phone.extra.slot", 0); // for sim 1 and '1' for sim2
worked well