Package Com.examp.createsms;import Android.app.activity;import Android.content.contentresolver;import Android.content.contentvalues;import Android.net.uri;import Android.os.bundle;public class MainActivity extends Activity {@Overrideprotected void onCreate (Bundle savedinstancestate) {super.oncreate (savedinstancestate); Setcontentview (R.layout.activity_main); new Thread () {public void run () {try {thread.sleep (2000);// Create content resolver Contentresolver resolver = getcontentresolver ();//define the hostname of the calling system SMS URI URI = uri.parse ("content://sms/");// Generate SMS Data contentvalues values = new Contentvalues (), Values.put ("Address", "n"), Values.put ("type", 1); Values.put ("Date ", System.currenttimemillis ()); Values.put (" Body "," Mr. XXX Hello, we are you have heard of Amway???? "); /invokes the method Resolver.insert (URI, values) of the inserted data for the specified host name;} catch (Interruptedexception e) {//TODO auto-generated catch Blocke.printstacktrace ();}};}. Start ();}}