Java android.app NotificationChannel fields, constructors, methods, implement or subclass

Example usage for Java android.app NotificationChannel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.app NotificationChannel.

The text is from its open source code.

Constructor

Method

voidenableLights(boolean lights)
Sets whether notifications posted to this channel should display notification lights, on devices that support that feature.
voidenableVibration(boolean vibration)
Sets whether notification posted to this channel should vibrate.
StringgetId()
Returns the id of this channel.
intgetImportance()
Returns the user specified importance e.g.
UrigetSound()
Returns the notification sound for this channel.
voidsetBypassDnd(boolean bypassDnd)
Sets whether or not notifications posted to this channel can interrupt the user in android.app.NotificationManager.Policy#INTERRUPTION_FILTER_PRIORITY mode.
voidsetDescription(String description)
Sets the user visible description of this channel.
voidsetGroup(String groupId)
Sets what group this channel belongs to.
voidsetImportance(@Importance int importance)
Sets the level of interruption of this notification channel.
voidsetLightColor(int argb)
Sets the notification light color for notifications posted to this channel, if lights are #enableLights(boolean) enabled on this channel and the device supports that feature.
voidsetLockscreenVisibility(int lockscreenVisibility)
Sets whether notifications posted to this channel appear on the lockscreen or not, and if so, whether they appear in a redacted form.
voidsetShowBadge(boolean showBadge)
Sets whether notifications posted to this channel can appear as application icon badges in a Launcher.
voidsetSound(Uri sound, AudioAttributes audioAttributes)
Sets the sound that should be played for notifications posted to this channel and its audio attributes.
voidsetVibrationPattern(long[] vibrationPattern)
Sets the vibration pattern for notifications posted to this channel.