Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for DataNotificationConfig
Summary
Public constructors
Public methods
setNotificationConfigType
fun setNotificationConfigType(config: Int): DataNotificationConfig.Builder
Sets the notification configuration type.
defaults to android.ranging.DataNotificationConfig.NotificationConfigType#NOTIFICATION_CONFIG_ENABLE
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 |
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 |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# DataNotificationConfig.Builder\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/ranging/DataNotificationConfig.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|-----------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.ranging.DataNotificationConfig.Builder](#) |\n\nBuilder for [DataNotificationConfig](/reference/kotlin/android/ranging/DataNotificationConfig)\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DataNotificationConfig](/reference/kotlin/android/ranging/DataNotificationConfig) | [build](#build())`()` Builds a new instance of [DataNotificationConfig](/reference/kotlin/android/ranging/DataNotificationConfig). |\n| [DataNotificationConfig.Builder](#) | [setNotificationConfigType](#setNotificationConfigType(kotlin.Int))`(`config:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the notification configuration type. |\n| [DataNotificationConfig.Builder](#) | [setProximityFarCm](#setProximityFarCm(kotlin.Int))`(`proximityCm:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the far proximity threshold in centimeters. |\n| [DataNotificationConfig.Builder](#) | [setProximityNearCm](#setProximityNearCm(kotlin.Int))`(`proximityCm:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the near proximity threshold in centimeters. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): DataNotificationConfig\n```\n\nBuilds a new instance of [DataNotificationConfig](/reference/kotlin/android/ranging/DataNotificationConfig).\n\n| Return ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DataNotificationConfig](/reference/kotlin/android/ranging/DataNotificationConfig) | a new [DataNotificationConfig](/reference/kotlin/android/ranging/DataNotificationConfig) instance created using the current state of the builder. This value cannot be `null`. |\n\n### setNotificationConfigType\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setNotificationConfigType(config: Int): DataNotificationConfig.Builder\n```\n\nSets the notification configuration type.\n\ndefaults to android.ranging.DataNotificationConfig.NotificationConfigType#NOTIFICATION_CONFIG_ENABLE\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `config` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The notification configuration type to set. Value is [android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_DISABLE](/reference/kotlin/android/ranging/DataNotificationConfig#NOTIFICATION_CONFIG_DISABLE:kotlin.Int), [android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_ENABLE](/reference/kotlin/android/ranging/DataNotificationConfig#NOTIFICATION_CONFIG_ENABLE:kotlin.Int), [android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_PROXIMITY_LEVEL](/reference/kotlin/android/ranging/DataNotificationConfig#NOTIFICATION_CONFIG_PROXIMITY_LEVEL:kotlin.Int), or [android.ranging.DataNotificationConfig#NOTIFICATION_CONFIG_PROXIMITY_EDGE](/reference/kotlin/android/ranging/DataNotificationConfig#NOTIFICATION_CONFIG_PROXIMITY_EDGE:kotlin.Int) |\n\n| Return ||\n|-------------------------------------|-----------------------------------------------------|\n| [DataNotificationConfig.Builder](#) | this Builder instance. This value cannot be `null`. |\n\n### setProximityFarCm\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setProximityFarCm(proximityCm: Int): DataNotificationConfig.Builder\n```\n\nSets the far proximity threshold in centimeters.\n\ndefaults to 20000 cm.\n\n| Parameters ||\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `proximityCm` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The far proximity to set, in centimeters. Value is between 0 and 20000 inclusive |\n\n| Return ||\n|-------------------------------------|-----------------------------------------------------|\n| [DataNotificationConfig.Builder](#) | this Builder instance. This value cannot be `null`. |\n\n### setProximityNearCm\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setProximityNearCm(proximityCm: Int): DataNotificationConfig.Builder\n```\n\nSets the near proximity threshold in centimeters.\n\ndefaults to 0 cm.\n\n| Parameters ||\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `proximityCm` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The near proximity to set, in centimeters. Value is between 0 and 20000 inclusive |\n\n| Return ||\n|-------------------------------------|-----------------------------------------------------|\n| [DataNotificationConfig.Builder](#) | this Builder instance. This value cannot be `null`. |"]]