Skip to content

ForegroundNotificationConfiguration

ForegroundNotificationConfiguration #

notification_channel_name #

notification_channel_name: str = 'Background Location'

The user visible name of the notification channel.

The notification channel name will be displayed in the system settings. The maximum recommended length is 40 characters, the name might be truncated if it is to long. Default value: "Background Location".

notification_enable_wake_lock #

notification_enable_wake_lock: bool = False

When enabled, a Wakelock is acquired when background execution is started.

If this is false then the system can still sleep and all location events will be received at once when the system wakes up again.

Wake lock permissions should be obtained first by using a permissions library.

notification_enable_wifi_lock #

notification_enable_wifi_lock: bool = False

When enabled, a WifiLock is acquired when background execution is started. This allows the application to keep the Wi-Fi radio awake, even when the user has not used the device in a while (e.g. for background network communications).

Wifi lock permissions should be obtained first by using a permissions library.

notification_set_ongoing #

notification_set_ongoing: bool = False

When enabled, the displayed notification is persistent and the user cannot dismiss it.

notification_text #

notification_text: str

The body used for the foreground service notification.

notification_title #

notification_title: str

The title used for the foreground service notification.