I send SMS using code below:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("smsto:" + phoneNumber));
intent.putExtra("address", phoneNumber);
intent.putExtra("sms_body", messageBody);
intent.setType("vnd.android-dir/mms-sms");
context.startActivity(intent);
I added both Uri with smsto: and address String extra to Intent. It works on most devices, but on some - it doesn't. One of the devices is SE XPERIA Mini. What else can be added when sending SMS to make sure recipient is set in SMS App?