Fcoder
Fcoder

Reputation: 9226

Disabling sound on Android's Ongoing notification updating

I have an Ongoing notification that shows Date and updates every minute inside a service. But in android 8 it plays sound in every update and users confused whats happening.

i set this:

builder.setPriority(NotificationCompat.PRIORITY_LOW);

This disabled the sound but has a side effect. Updating the Date is not working too! I want to update Notification without any sound. how it is possible?

Upvotes: 1

Views: 64

Answers (1)

Lior Michelzon
Lior Michelzon

Reputation: 81

In your notification channel try to set the sound to null. Like so:

channel.setSound(null, null);

Upvotes: 1

Related Questions