I wrote a code that sends SMS to a specific number, but it works on current phones with 1 SIM card, how to make it so that you can also send SMS from a dual SIM ... can you say let's say sending from the first SIM, or from two at once ..
public class MainActivity extends AppCompatActivity { Button button; EditText edittext; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button = (Button) findViewById(R.id.button); edittext = (EditText) findViewById(R.id.text); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String number = "номер телефона"; String text = "текст"; SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(number,null,text,null,null); } }); } }