2017-02-11 121 views
0

我想創建沒有任何聲音的通知。我該怎麼做?謝謝。在Android中禁用通知聲音

這是我的代碼:Link

對不起我friends.I不能在這裏把我的代碼。

非常感謝。

+2

你不能使用一些安全的網站上傳它像保管箱或驅動器? – Redman

+0

對不起,不,我不能。 – Mahdi

+0

請嘗試在一個更安全的地方上傳你的代碼....! – Shobhit

回答

1

我真不明白你的問題,但在簡單的terms..this是android系統中創建通知代碼:

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

並禁用的聲音,你必須補充一點:

notifica.defaults = 0; 
+1

謝謝Shobhit – Mahdi