Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Intent; import android.net.Uri; import android.support.annotation.NonNull; public class Main { @NonNull public static Intent sendSms(@NonNull String to, @NonNull String message) { final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:" + to)); intent.putExtra("sms_body", message); return intent; } }