用于短信的广播接收器

编程入门 行业动态 更新时间:2024-10-21 15:32:56
用于短信的广播接收器 - 如何在默认消息传递应用程序读取之前阻止/删除短信(Broadcast Receiver for sms - how to block/delete sms before it is read by default messaging app)

我的目标是创建一个应用程序,用于存储短信包含在短信中的某些单词,并阻止它到达默认的短信应用程序。 我意识到我需要在我的应用程序中放置一个sms消息的广播接收器,但是如何确保如果消息包含KEYWORD,消息会立即被删除并且无法访问任何其他消息应用程序? 我被困在这里,所以任何帮助都表示赞赏。 谢谢

问候,

法尔汉

I aim to make an app that would store sms messages with certain words contained in an sms, and stop it from reaching the default messaging app. I realize that I need to place a broadcast receiver for sms messages in my app, but how do I ensure that If a message contains a KEYWORD, the message gets deleted immediately and becomes unaccessible to any other messaging app? I am stuck here, so any help is appreciated. Thank you

Regards,

Farhan

最满意答案

请参阅如何以编程方式从Android的收件箱中删除短信? 我们可以在Android到收件箱之前删除Android中的短信吗? 。 在删除它之前,应用逻辑来搜索KEYWORD的消息,然后仅删除那些特定的消息。

See How to delete an SMS from the inbox in Android programmatically? and Can we delete an SMS in Android before it reaches the inbox?. Before deleting it, apply logic to search the message for your KEYWORD and then delete only those specific messages.

更多推荐

sms,app,应用,程序,电脑培训,计算机培训,IT培训"/> <meta name="description&quo

本文发布于:2023-08-05 18:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1435761.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:接收器   短信

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!