Builder
class Builder
kotlin.Any | |
↳ | android.ranging.DataNotificationConfig.Builder |
Builder for DataNotificationConfig
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
DataNotificationConfig |
build() Builds a new instance of |
DataNotificationConfig.Builder |
setNotificationConfigType(config: Int) 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
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
Parameters | |
---|---|
config |
Int: The notification configuration type to set. Value is android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_DISABLE , android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_ENABLE , android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_PROXIMITY_LEVEL , or android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_PROXIMITY_EDGE |
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 . |