开发者

control a number of sms sent in android

开发者 https://www.devze.com 2023-04-11 01:23 出处:网络
i make an application for sending sms automatically to the incoming Number.开发者_开发问答 But the problem is that ,it send 2 sms instead of one in each call.

i make an application for sending sms automatically to the incoming Number.开发者_开发问答 But the problem is that ,it send 2 sms instead of one in each call. i verified in my log, my "onreceive()" method for broadcastReceiver is called twice at the phone state changed and i dont know how to control this. have someone an idea? thanks for hepl sorry for my twisted english.


if(EXTRA_STATE == RINGING)
    sendSMS();

Can you only check the ringing state of the incoming call? It will ensure your sms is sent only once when the incoming call is at ringing state, not others.

0

精彩评论

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

关注公众号