startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("sms:"
+ + phoneNumber)));
PhoneNumber is the mobile number you want to send.
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:" + phoneNumber));
intent.putExtra("sms_body", message);
startActivity(intent);
You can do it like this.
© 2024 OneMinuteCode. All rights reserved.