Example usage for Java android.app NotificationChannel fields, constructors, methods, implement or subclass
The text is from its open source code.
NotificationChannel(String id, CharSequence name, @Importance int importance) Creates a notification channel. |
void | enableLights(boolean lights) Sets whether notifications posted to this channel should display notification lights, on devices that support that feature. |
void | enableVibration(boolean vibration) Sets whether notification posted to this channel should vibrate. |
String | getId() Returns the id of this channel. |
int | getImportance() Returns the user specified importance e.g. |
Uri | getSound() Returns the notification sound for this channel. |
void | setBypassDnd(boolean bypassDnd) Sets whether or not notifications posted to this channel can interrupt the user in android.app.NotificationManager.Policy#INTERRUPTION_FILTER_PRIORITY mode. |
void | setDescription(String description) Sets the user visible description of this channel. |
void | setGroup(String groupId) Sets what group this channel belongs to. |
void | setImportance(@Importance int importance) Sets the level of interruption of this notification channel. |
void | setLightColor(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. |
void | setLockscreenVisibility(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. |
void | setShowBadge(boolean showBadge) Sets whether notifications posted to this channel can appear as application icon badges in a Launcher. |
void | setSound(Uri sound, AudioAttributes audioAttributes) Sets the sound that should be played for notifications posted to this channel and its audio attributes. |
void | setVibrationPattern(long[] vibrationPattern) Sets the vibration pattern for notifications posted to this channel. |