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.
精彩评论