I am trying to share text through SMS. It looks fine on most of the phones, even Samsung phones, except on Galaxy S5.
Here is the code:
public static void shareWithSMS(@NonNull Context context, @Nullable String text) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.fromParts("sms", "", null));
intent.setType("vnd.android-dir/mms-sms");
intent.putExtra("sms_body", text);
context.startActivity(intent);
}
It launch the app for SMS, without any text. Does anyone know why?
UPDATE
The aim is to launch the sms app of the device, not to send the SMS. That's why I am not using SmsManager
.