Joke Collection Website - Public benefit messages - How to send information regularly in android

How to send information regularly in android

private Handler mHandler = new Handler() {

/*

*Send control

*/

@Override

public void handleMessage(Message msg) {

switch(msg.what) {

case 123:

SmsManager manager = SmsManager.getDefault();//Get the default SmsManager.

/** destinationAddress: receiver’s mobile phone number

scAddress: sender’s mobile phone number

text: message content

sentIntent :Receipt of successful sending.

DeliveryIntent: Receipt of successful receipt. */

manager.sendTextMessage("1234", "1234", "1234", null, null);

default:

break;

p>

}

}

};

/*

*Sending function, the parameters are from the current time to the sending Time interval

*/

public void send(int duration) {

mHandler.sendEmptyMessageDelayed(123, duration);

}