how can i stop the ‘noise’ of a service notification programmatically when invoked by the notification ui?

As notification channels are a must for Oreo+ APIs, then this is most probably related to the channel.

I think you can stop this sound by using NotificationManager.IMPORTANCE_LOW while creating the Foreground service notification channel.

NotificationChannel serviceChannel = new NotificationChannel(
                CHANNEL_ID,
                CHANNEL_NAME,
                NotificationManager.IMPORTANCE_LOW // <<<<<
        );

NotificationManager manager = getSystemService(NotificationManager.class);
manager.createNotificationChannel(serviceChannel);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top