[英]android check if "Allow sound" notification setting is enabled or disable programmatically
[英]Disable notification sound in android
我真的不明白您的問題,但用簡單的話來說..這是在android中創建通知的代碼:
Notification notifica = new Notification();
notifica.flags |= Notification.FLAG_AUTO_CANCEL;
notifica.icon = R.drawable.serie_notification;
notifica.when = System.currentTimeMillis();
要禁用聲音,您必須添加以下內容:
notifica.defaults = 0;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.