send sms in android programmatically code example
Example 1: send sms programmatically android
Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse( "sms:" + srcNumber));
intent.putExtra( "sms_body", message );
startActivity(intent);
Example 2: how to open sms app on android programmatically
Intent intent = new Intent( Intent.ACTION_VIEW);
intent.setData(Uri.parse("smsto:" + Uri.encode(phoneNumber)));
intent.putExtra( "sms_body", "" );
startActivity(intent);