*Updating notification channel settings*
- Once you create a notification channel, the user is in charge of its settings and behavior. - You can call `createNotificationChannel()` again to rename an existing notification channel, or update its description. - We can direct the user to the notification settings page within the device settings via the user of the Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS intent action. To do this we just need to provide two extras when creating the intent: - EXTRA_CHANNEL_ID — The ID of the channel settings which you wish to navigate the user to - EXTRA_APP_PACKAGE — The package for your application
{code :java } Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS); intent.putExtra(Settings.EXTRA_CHANNEL_ID, mChannel.getId()); intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName()); startActivity(intent); {code} |
|