title: Make call using a specified SIM in a Dual SIM Device
body: <p>I have been searching for this from past few days and I came to know that:</p>
  
  <p>"Dual SIM is not supported in Android out of the box. It is a custom modification by manufacturers, and there is no public API to control it."</p>
  
  <p>There is a solution provided in the below link but its not working on my phone Samsung Galaxy S4 Mini.</p>
  
  <p><a href="https://stackoverflow.com/questions/13231962/call-from-second-sim">Call from second sim</a></p>
  
  <p>I also found this link, which I found very informative.</p>
  
  <p><a href="http://www.devlper.com/2010/06/using-android-telephonymanager/" rel="noreferrer">http://www.devlper.com/2010/06/using-android-telephonymanager/</a></p>
  
  <p>Now I know that using the following code, I might have a chance to get lucky to make it working:</p>
  
  <pre><code>Intent callIntent = new Intent(Intent.ACTION_CALL)
                  .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          callIntent.setData(Uri.parse("tel:" + phone));
          context.startActivity(callIntent);
  callIntent.putExtra("com.android.phone.extra.slot", 0); //For sim 1
  and
  callIntent.putExtra("com.android.phone.extra.slot", 1); //For sim 2
  </code></pre>
  
  <p>I am not sure about this, but I have a question. </p>
  
  <p>In Settings under the SIM Card Manager section, when I have to choose a preferred SIM card for Voice Call, I get four options:</p>
  
  <ol>
  <li>Current Network</li>
  <li>Ask Always</li>
  <li>SIM 1</li>
  <li>SIM 2</li>
  </ol>
  
  <p>When I choose Ask Always option then before making a call I am always asked for choosing a SIM Card, displayed in a Dialog Box, to make the call. My question is can I exploit this thing in my App where I press a button to make a call but it always asks me the same way it does when I chose Ask Always option. </p>
  
  <p>I am sorry, I made this question lengthy, but I think it required it. Please help and big thanks in advance.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>How can I achieve this, everytime I press any button (Kind of similar to Ask Always option in Settings) :
  <img src="https://i.stack.imgur.com/jNQkT.png" alt="Select SIM Dialog Box"></p>