SMS Timer APK Description:
Sends a text message to set the content of the mobile phone number after the set time.
Permission acquisition:
<manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "Com.example.chenh2.hellohao" > <application android:allowbackup= "true" android:icon= "@drawable/ic_launcher" Android:label = "@string/app_name" android:theme= "@style/apptheme" > <activity android:name= ". Mainactivity "android:label=" @string/app_name "> <intent-filter> <action Android:name= "Android.intent.action.MAIN"/> <category android:name= "Android.intent.category.LAUNCHER "/> </intent-filter> </activity> <activity android:name=". Chooseactivity "android:label=" @string/title_activity_choose "> </activity> </application ><uses-permission android:name= "Android.permission.SEND_SMS"/></manifest>
Activity Jump and data transfer:
Intent chooseintent = new Intent (Mainactivity.this,chooseactivity.class );//activity Jump Bundle Bundle = new Bundle (); Bundle.putstring ("Phone", num); Bundle.putstring ("Smsm" , MES); Chooseintent.putextras (bundle); Data transfer Phone.settext (""); Sms.settext (""); Time.settext (""); if(Phonenumberutils.isglobalphonenumber (num)) {URI Uri= Uri.parse ("Smsto:" +num); Intent it=NewIntent (Intent.action_sendto, URI); It.putextra ("Sms_body", MES); Try { intn =Integer.parseint (minu); if(n>0){ while(n>0) {Thread.Sleep (1000); SYSTEM.OUT.PRINTLN (n); N--; } } } Catch(interruptedexception e) {e.printstacktrace (); } if(remind.ischecked ()) { startactivity (chooseintent); Activity Jump }Else{Smsmanager Smsmanager=Smsmanager.getdefault (); List<String> dividecontents =smsmanager.dividemessage (MES); for(String text:dividecontents) { smsmanager.sendtextmessage (num, null, text, NULL, NULL );//SMS Send } return; }
Public classChooseactivityextendsactionbaractivity {@Overrideprotected voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); Setcontentview (R.layout.activity_choose); Button Yes=(Button) Findviewbyid (R.id.yes); Yes.setonclicklistener (NewButton.onclicklistener () { Public voidOnClick (View v) {Smsmanager Smsmanager=Smsmanager.getdefault (); List <String> dividecontents = Smsmanager.dividemessage (Getintent (). Getextras (). getString ("smsm");//Data acquisition for(String text:dividecontents) {smsmanager.sendtextmessage (Getintent (). Getextras (). getString ("Phone"),NULL, text,NULL,NULL); } finish (); } }); Button No=(Button) Findviewbyid (r.id.no); No.setonclicklistener (NewButton.onclicklistener () { Public voidOnClick (View v) {finish (); } }); }
APK DOWNLOAD Link:
http://files.cnblogs.com/files/udld/app-release.apk
APK develop--sms Timer