如何prevent收到的短到达收件箱? [英] How to prevent incoming SMS from reaching the inbox?

查看:174
本文介绍了如何prevent收到的短到达收件箱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个简单的应用程序接收,但不处理短信。它检查每一个接收到的SMS特定的关键词。如果短信中包含的关键词然后做出相应的响应。如果的关键词不存在,那么我的应用程序什么都不做。我有这么多的工作。

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.

我在想,如果有一种方式,以prevent在手机上的默认短信应用程序接收文本只有当我的应用程序认定的关键词。

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

推荐答案

在广播接收器设置的android:优先级为100,并在onRecieve()this.abortBroadcast(); 这将prevent从看到短信到其他应用.....甚至不会进入收件箱

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

这篇关于如何prevent收到的短到达收件箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆