Builder


class Builder

Builder for DataNotificationConfig

Summary

Public constructors

Public methods
DataNotificationConfig

Builds a new instance of DataNotificationConfig.

DataNotificationConfig.Builder

Sets the notification configuration type.

DataNotificationConfig.Builder
setProximityFarCm(proximityCm: Int)

Sets the far proximity threshold in centimeters.

DataNotificationConfig.Builder
setProximityNearCm(proximityCm: Int)

Sets the near proximity threshold in centimeters.

Public constructors

Builder

Builder()

Public methods

build

fun build(): DataNotificationConfig

Builds a new instance of DataNotificationConfig.

Return
DataNotificationConfig a new DataNotificationConfig instance created using the current state of the builder. This value cannot be null.

setNotificationConfigType

fun setNotificationConfigType(config: Int): DataNotificationConfig.Builder

Sets the notification configuration type.

defaults to android.ranging.DataNotificationConfig.NotificationConfigType#NOTIFICATION_CONFIG_ENABLE

Return
DataNotificationConfig.Builder this Builder instance. This value cannot be null.

setProximityFarCm

fun setProximityFarCm(proximityCm: Int): DataNotificationConfig.Builder

Sets the far proximity threshold in centimeters.

defaults to 20000 cm.

Parameters
proximityCm Int: The far proximity to set, in centimeters. Value is between 0 and 20000 inclusive
Return
DataNotificationConfig.Builder this Builder instance. This value cannot be null.

setProximityNearCm

fun setProximityNearCm(proximityCm: Int): DataNotificationConfig.Builder

Sets the near proximity threshold in centimeters.

defaults to 0 cm.

Parameters
proximityCm Int: The near proximity to set, in centimeters. Value is between 0 and 20000 inclusive
Return
DataNotificationConfig.Builder this Builder instance. This value cannot be null.