问题
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