0

I am trying to make an SMS app in android. There are some messages which contents I want to keep hidden but as soon as I receive a message, android stausbar shows the contents of the message. How can I disable this programatically in my application?

Eli
  • 14,779
  • 5
  • 59
  • 77
aneela
  • 1,457
  • 3
  • 24
  • 45

1 Answers1

3

Take a look at this question

Can we delete an SMS in Android before it reaches the inbox?

It shows you how to use a BroadcastReceiver to listen for SMS notifications and cancel them reaching other applications. This will allow your SMS app to display whatever notifications you wish, or don't.

Community
  • 1
  • 1
Rawkode
  • 21,990
  • 5
  • 38
  • 45
  • after setting the priority of `IntentFilter`, how can I just disable the `NotificationBar` not to show any message content then hiding it completely. – aneela Dec 18 '12 at 05:40
  • because I dont want to make other messaging app not to receive the intent so I am not cancelling the broadcast.Is it even possible? because I cannot make other apps not to show sms contents in `notificationbar`... – aneela Dec 18 '12 at 05:48