0

I want to make an SMS theme. I built it but one issue is remaining. When I receive an SMS, the default SMS theme notification and my app's SMS notification are both called and show on the notification bar. I want to disable the default SMS notification.

How can I disable it.

I found some where that the following code prevents it.

abortBroadcast();

But this disables the SMS data not saved to default DB. In other words, I only want to remove notification icons--not to remove the sms.

yarian
  • 5,922
  • 3
  • 34
  • 48
ibad ur rahman
  • 1,381
  • 4
  • 18
  • 40

2 Answers2

3

AFAIK, this is not possible. It would be up to the user to turn off notifications from whatever SMS app they use. I have used the default, ChompSMS and HandcentSMS...

Both Chomp and Handcent tell you to go to the default app and turn off notifications in the settings there so you don't get duplicate notifications.

Even if you could programmatically turn off the notifications for the default app, you would have to find a way to turn off notifications for all 3rd party apps as well...

baldguy
  • 2,090
  • 1
  • 16
  • 25
1

maybe what you could do (untested) is to abortBroadcast();

then write the sms back into the content provider

kinda the same way this answer writes to the inbox

content://sms/sent and content://sms/inbox

although content providers for sms are undocumented and unreliable across devices.

Community
  • 1
  • 1
StrikeForceZero
  • 2,379
  • 1
  • 25
  • 36