4

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

Farhan
  • 1,000
  • 1
  • 11
  • 22
  • You might want to upvote and accept the answer. You stats show that you haven't accepted answers on any of your questions, that's not encouraging. :-) – Kazekage Gaara May 18 '12 at 11:50

1 Answers1

5

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.

Community
  • 1
  • 1
Kazekage Gaara
  • 14,972
  • 14
  • 61
  • 108