Java tutorial
//package com.java2s; import android.content.Context; import android.content.Intent; import android.net.Uri; public class Main { public static void sendMessage(Context activity, String phoneNumber, String smsContent) { if (phoneNumber == null || phoneNumber.length() < 4) { return; } Uri uri = Uri.parse("smsto:" + phoneNumber); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra("sms_body", smsContent); it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); activity.startActivity(it); } }