In fact, the steps for sending text messages are the same as those for calling. Step 1: Page 1, Res/layout/main. XML file <textview Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: text = "@ string/user"/> <edittext Android: id = "@ + ID/user" Android: layout_width = "match_parent" Android: layout_height = "50dp"/> <textview Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: text = "@ string/content"/> <edittext Android: Id = "@ + ID/content" Android: layout_width = "match_parent" Android: layout_height = "50dp"/> <button Android: Id = "@ + ID/Send" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "@ string/Send"/> 2. Res/values/strings. XML <string name = "app_name"> SMS sending interface </string> <! -- Step 1: write the corresponding text content --> <string name = "user"> receiver </string> <string name = "content"> information content </string> <string name = "Send "> send </string> Step 2: note that the intention of sending a text message is different from that of calling sendmessageactivity. javapublic class sendmessageactivity extends activity implements onclicklistener {@ override public void oncreate (bundle savedinstancestate) {super. oncreate (savedinstancestate); setcontentview (R. layout. main); // obtain the component button sendbtn = (button) findviewbyid (R. id. send); // register the event sendbtn. setonclicklistener (this) ;}@ suppresswarnings ("deprecation") @ overridepublic void onclick (view v) {// todo auto-generated method stubedittext user = (edittext) findviewbyid (R. id. user); edittext content = (edittext) findviewbyid (R. id. content); // information management object smsmanager = smsmanager. getdefault (); // The normal intent state of the Request Code represented by the last three parameters: pendingintent intent = pendingintent. getbroadcast (sendmessageactivity. this, 0, new intent (), 0); // send smsmanager information. sendtextmessage (user. gettext (). tostring (), null, content. gettext (). tostring (), intent, null); // The message is successfully sent toast. maketext (sendmessageactivity. this, "message sent successfully", toast. length_long ). show () ;}} Step 3: Add a user permission similar to the call procedure, except that the permission is Android. permission. send_sms