a while back I updated my App to add support for Android 8+, after updating the notifications to use the required NotificationChannel I noticed that I lost a feature.
The App uses a chronometer notification, back then I was able to update the Notification priority, to display a notification using PRIORITY_HIGH, so the notification was "pushed" to the user, and then edit the notification priority to PRIORITY_LOW, to hide the notification.
After reading the docs, from what I could understand, I can't control the priority after creating the NotificationChannel, leaving this control to the user, however, asking for the user to edit the notification settings is not optimal for my usage.
Relevant code:
//Creating the notification channel (while setting up the app)
NotificationChannel channel = new NotificationChannel(channelId, channelTitle, NotificationManager.IMPORTANCE_HIGH);
//Editing the NotificationChannel to lower the Notification priority (not working)
NotificationChannel channel = notificationManager.getNotificationChannel(channelId);
channel.setImportance(NotificationManager.IMPORTANCE_LOW);
notificationManager.createNotificationChannel(channel);
Is there a way accomplish this behavior, while still using the NotificationChannels?