APK develop--sms Timer

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.