开发者

Broadcast Receiver for Sent SMS

开发者 https://www.devze.com 2023-04-08 22:51 出处:网络
Is there a Broadcast Receiver in android to listen to the SMS sent event? In my application I want to count the number of SMS sent every predefined time interval. If its not possible to listen to sen

Is there a Broadcast Receiver in android to listen to the SMS sent event?

In my application I want to count the number of SMS sent every predefined time interval. If its not possible to listen to sent sms, can anyone share code to count SMS and for specified 开发者_JS百科time for example last 30 minutes.


Check this link....i think its not complete solution but you have some idea how to implement...

http://www.anddev.org/other-coding-problems-f5/sms-mms-contentobserver-and-service-t12938.html

you can implement content://sms/sent observer se.. so if any changes in this then you can get event so u can count or get action sent sms or mms.......


You can edit your own sms with SmsManager api from google and be notified by a PendingIntent:

SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage (String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)

You can be notified of the delivery with the parameter: PendingIntent sentIntent

But SmsManager is now deprecated :(

0

精彩评论

暂无评论...
验证码 换一张
取 消