开发者

control a number of sms sent in android

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜