sending sms to multiple contacts using loop

試著忘記壹切 提交于 2019-12-04 17:38:25

Your problem is the part where you are creating new Intent Object with the same name for all numbers,when doing this you are overriding the registered broadcast with the newer number so when the older one catches a broadcast and runs the onReceive function it finds that its not registered any more! your solution is to change the Intent initialization to something like this:

Intent i = new Intent(SENT_INTENT + phoneNumber);

and the same for the delivery intent,let me know if your problem is solved

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!