Google is committed to advancing racial equity for Black communities. See how.

Set Up Notifications

Use the settings provided in config.xml and integers.xml to set up the appearance and configurations of your notifications.

Appearance

To configure the appearance of notifications, modify these settings in config.xml:

Purpose Setting
Display the navigation as a heads-up notification. config_showNavigationHeadsup
Default: true
Specify the background color of the notification card for the category entitled
Notification.CATEGORY_NAVIGATION
config_enableCardBackgroundColorForCategoryNavigation
Default: false
Set the background color of the card for notifications from system apps. config_enableCardBackgroundColorForSystemApp
Default: false
Display the notification header at the top of the notifications list. config_showHeaderForNotifications
Default: false
Display the notification footer at the bottom of notifications list. config_showFooterForNotifications
Default: true
Change the accent color of the small icon. config_enableSmallIconAccentColor
Default: true

Functionality

To configure how notifications function, update these settings in integers.xml:

Purpose Setting
Set the maximum number of group members displayed when notification group is expanded. max_group_children_number
Default: 8
Specify the duration of heads-up notifications in milliseconds. When this duration elapses, heads-up notifications will be automatically dismissed until an update to an existing heads-up notification for which this flag is set:

Notification.FLAG_ONLY_ALERT_ONCE

Time will be reset when an update is received and the heads-up notification will be displayed for a longer duration. Should this flag be set and an update received, the time will not be reset.
headsup_notification_duration_ms
Default: 8000
Set the minimum display time (in milliseconds) for a heads-up notification. When an app cancels notification as soon as it's posted or within the configured time duration, the heads-up notification will be displayed for at least this much time. heads_up_notification_minimum_time
Default: 2000
Specify the total duration (in milliseconds) needed by a fly-in animation to display a heads-up notification. headsup_total_enter_duration_ms
Default: 233
Set the time (in milliseconds) needed by a fly-in animation to display a heads-up notification for alpha. During animation, the time needed for a heads-up notification to transition from transparent to opaque. headsup_alpha_enter_duration_ms
Default: 83
Specify the time (in milliseconds) needed by a fly-out animation to display a heads-up notification. headsup_exit_duration_ms
Default: 150

Define the minimum velocity (in pixels per second) used to determine that a swipe moves in the same direction.

min_velocity_for_swipe_direction_detection
Default: 50