Send SMS with one click.2, Android./*" />

Joke Collection Website - Blessing messages - In eclipse, how to make a button and click it to send the specified message to the specified number? Find the specific code

In eclipse, how to make a button and click it to send the specified message to the specified number? Find the specific code

1, what project is eclipse going to do? If it is jsp, there is code in HTML to pull short messages.

& lt answer? Href = "SMS:139xxxxxxxx" > Send SMS with one click.

2, Android.

/**?

*? Call the SMS interface directly to send SMS?

*? @param? Phone number?

*? @param? Leave a message

*/?

Public? Invalid? SendSMS (string? Phone number, string? Message) {?

//Get the SMS Manager

android.telephony.SmsManager? smsManager? =? Android . telephony . SMS manager . get default(); ?

//Split SMS content (SMS length limit)

List & lt string & gt? Dividend content? =? SmsManager.divideMessage (message);

For what? (string? Words? :? divideContents)? {

SmsManager.sendTextMessage (phone number,? null,? Text,? sentPI,? deliver pi);

}?

} Just execute this method in the click event of the button.