Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : Notification sound disable

Tags:

I have a notification with this code :

Notification notifica = new Notification(); notifica.flags |= Notification.FLAG_AUTO_CANCEL; notifica.icon = R.drawable.serie_notification; notifica.when = System.currentTimeMillis(); 

with notifica.defaults = notifica.defaults|Notification.DEFAULT_SOUND; I enable the default sound but if I want to disable the sound how can I do ??

like image 681
MimmoG Avatar asked Oct 04 '11 23:10

MimmoG


1 Answers

Well, it worked for me by doing this:

myNotification.defaults = 0; 

Try it out =)

like image 128
Ted Avatar answered Nov 05 '22 18:11

Ted