title: How to prompt for sim selection before sending an SMS in dual sim phones using SMS manager programmatically?
body: <blockquote>
    <p>How to find SubscriptionId by prompting sim selection?</p>
  </blockquote>
  
  <pre><code> SmsManager smsManager = null;
                     if (android.os.Build.VERSION.SDK_INT &gt;= android.os.Build.VERSION_CODES.LOLLIPOP_MR1) {
                       smsManager = SmsManager.getSmsManagerForSubscriptionId();
                     }else{
                         smsManager = SmsManager.getDefault();
                     }`
  </code></pre>
  
  <p>subcription id needed inside <code>getSmsManagerForSubscriptionId()</code></p>