How to prevent incoming SMS from reaching the inbox?

江枫思渺然 提交于 2019-12-21 02:58:30

问题


I'm working on a simple app that receives, but not handles sms messages. It checks each incoming sms for a specific keyphrase. If the sms contains that keyphrase then it responds accordingly. If the keyphrase doesn't exist, then my app does nothing. I have this much working.

I was wondering if there was a way to prevent the default sms app on the phone from receiving the text only if my app finds that keyphrase.

Thanks for the help
Andrew


回答1:


in broadcast receiver set android:priority="100" and in onRecieve() this.abortBroadcast(); this will prevent from seeing the sms to other application .....even will not go into inbox




回答2:


I think these two thread can help you
disable of sms notification

Can we delete sms before ...



来源:https://stackoverflow.com/questions/3330174/how-to-prevent-incoming-sms-from-reaching-the-inbox

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