I want to update notification channel name according to Locale. In order to do that I’m using a BroadcastReceiver and listening for the ACTION_LOCALE_CHANGED broadcast.
My question is what is the right way to update the name?
Should I do something like this?
notificationManager.getNotificationChannel(CHANNEL_ID).setName(“newName”);
Or should I recreate the channel like this?
NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, “newName”, NotificationManager.IMPORTANCE_DEFAULT);
notificationManager.createNotificationChannel(notificationChannel);
By doing this (second approach) am I overriding anything except the channel name of course?