Hi, as far as I know there is no direct way to trigger an in-built dialog box. So, I would suggest to get the sim information first then create a dialog box on your own. There are more than 1 ways to accomplish this. One method is to use reflection and other way is to read from system db located at /data/data/com.android.providers.telephony/databases/telephony.db. But both of these methods are not so reliable (may not work on all the devices).
However, if you are target is Android 22 and above, then using android SubscriptionManager and SmsManager is reliable.
Get sim(s) information with,
SubscriptionManager subscriptionManager = SubscriptionManager.from(getApplicationContext());
List<SubscriptionInfo> subscriptionInfoList = subscriptionManager.getActiveSubscriptionInfoList();
List<double> subscriptionIds = new ArrayList<double>();
for (SubscriptionInfo subscriptionInfo : subscriptionInfoList) {
subscriptionIds.add(subscriptionInfo.getSubscriptionId());
}
// subscriptionIds will have the information about the sims
// Create your own dialog box to handle the selection
Send the sms with,
SmsManager.getSmsManagerForSubscriptionId(int subscriptionId).sendTextMessage(String destinationAddress, String scAddress, String text,PendingIntent sentIntent, PendingIntent deliveryIntent);
Hope this helps!