Just FYI, by the time you get to this tutorial it assumes that you've included something noted on the previous page within your MainActivity java file (or whatever you've called it) and modified your activity_mail layout file (or whatever yours is called) neither of which are properley documented.
The addition to the MainActivity java file is:
Code:
public void onSMSIntentClick (View v) {
Intent i = new
Intent(android.content.Intent.ACTION_VIEW);
i.putExtra("address", "5556;");
i.putExtra("sms_body", "Hello my friends!");
i.setType("vnd.android-dir/mms-sms");
startActivity(i);
}
And the addition to your activity_main layout file is:-
Code:
<Button
android:id="@+id/btnSendSMSIntent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Send SMS Using Intent"
android:onClick="onSMSIntentClick" />