publicvoid sendTextMessage (String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)
Since:
APILevel 4
Send a text based SMS.
Parameters
destinationAddress | 发送短信的地址(也就是号码) |
---|---|
scAddress | 短信服务中心,如果为null,就是用当前默认的短信服务中心 |
text | 短信内容 |
sentIntent | 如果不为null,当短信发送成功或者失败时,这个PendingIntent会被广播出去成功的结果代码是Activity.RESULT_OK,或者下面这些错误之一 RESULT_ERROR_GENERIC_FAILURE RESULT_ERROR_RADIO_OFF RESULT_ERROR_NULL_PDU 对于 RESULT_ERROR_GENERIC_FAILURE, |
deliveryIntent | 如果不为null,当这个短信发送到接收者那里,这个PendtingIntent会被广播,状态报告生成的pdu(指对等层次之间传递的数据单位)会拓展到数据("pdu") |