0
我是android新手。在我的应用程序中,我想用联系人发送短信。如何通过我的应用程序向其他人发送短信如何向联系人发送短信?
我是android新手。在我的应用程序中,我想用联系人发送短信。如何通过我的应用程序向其他人发送短信如何向联系人发送短信?
private String SENT = "SENT";
private String DELIVERED = "DELIVERED";
...
PendingIntent sentPI = PendingIntent.getBroadcast(this.context, this.getUniqueId(), new Intent(this.SENT), 0);
PendingIntent deliveredPI = PendingIntent.getBroadcast(this.context, this.getUniqueId(), new Intent(this.DELIVERED), 0);
String smsNumber = "+123456";
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(smsNumber, null, "sms content", this.sentPI, this.deliveredPI);
下面是一个示例:http://tinyurl.com/5rluxet – mdm 2011-06-10 09:50:15