Hai我想通过编码发送消息是否有可能?
mobile number="xxx"
message="hai"
Anyboby请用代码解释
答案 0 :(得分:1)
//---sends an SMS message to another device---
private void sendSMS(String phoneNumber, String message)
{
PendingIntent pi = PendingIntent.getActivity(this, 0,
new Intent(this, SMS.class), 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, pi, null);
更多信息:http://mobiforge.com/developing/story/sms-messaging-android
答案 1 :(得分:0)
你走了:
SmsManager sm = SmsManager.getDefault();
String number = "6508570720";
sm.sendTextMessage(number, null, "Test SMS Message", null, null);
希望有所帮助!
参考:http://thinkandroid.wordpress.com/2010/01/08/sending-sms-from-application/
答案 2 :(得分:0)
你可以像我一样google on android sms api,并获得this链接。