安卓通知声音关闭 [英] Android : Notification sound disable
本文介绍了安卓通知声音关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个code的通知:
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();
是 notifica.defaults = notifica.defaults | Notification.DEFAULT_SOUND; 我启用默认的声音,但如果我想关闭声音我该怎么办?
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 ??
推荐答案
那么,它的工作对我来说做这个:
Well, it worked for me by doing this:
myNotification.defaults = 0;
试试吧=)
这篇关于安卓通知声音关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文