0

I need to delete a single SMS from the inbox on its arrival.

Basically my application will get to know when an SMS is received, it will process few things depending on the message and then it needs to delete that message from inbox.

I searched a lot, but only found a way to delete entire inbox; I just need to delete a single message from the inbox.

Your help would be appreciated.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
anila
  • 1
  • 1
  • 2

2 Answers2

1

you should use abortBroadCast(). means that in the SMS BroadCastReceiver you will get the sender contact and will compare or do another process and there you will put this instruciton

 this.abortBroadCast();

and hence this messages will be ignore to go to inbox

Pir Fahim Shah
  • 10,505
  • 1
  • 82
  • 81
0

You can use abortBroadcast() when done.

bond
  • 573
  • 1
  • 6
  • 5