Stay organized with collections
Save and categorize content based on your preferences.
interface WatcherRegistration : AutoCloseable
Defines a registration, returned when registering a watcher. Through this interface a watcher can be unregistered. WatcherRegistration
extends a AutoCloseable
so it can be used with use
api. Unregistering a watcher will ensure its visibility condition is
Summary
Public functions |
open Unit |
|
Unit |
Unregisters the dialog associated to this registration.
|
Public functions
fun unregister(): Unit
Unregisters the dialog associated to this registration.
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-08-13 UTC.
[null,null,["Last updated 2025-08-13 UTC."],[],[],null,["# WatcherRegistration\n===================\n\nArtifact: [androidx.test.uiautomator:uiautomator](/jetpack/androidx/releases/test-uiautomator) \n[View Source](https://cs.android.com/search?q=file:androidx/test/uiautomator/watcher/Watcher.kt+class:androidx.test.uiautomator.watcher.WatcherRegistration) \nAdded in [2.4.0-alpha06](/jetpack/androidx/releases/test-uiautomator#2.4.0-alpha06)\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/androidx/test/uiautomator/watcher/WatcherRegistration \"View this page in Java\")\n\n\n```\ninterface WatcherRegistration : AutoCloseable\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDefines a registration, returned when registering a watcher. Through this interface a watcher can be unregistered. [WatcherRegistration](/reference/kotlin/androidx/test/uiautomator/watcher/WatcherRegistration) extends a [AutoCloseable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-auto-closeable/index.html) so it can be used with [use](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/index.html) api. Unregistering a watcher will ensure its visibility condition is\n\nSummary\n-------\n\n| ### Public functions |\n|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `open `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [close](/reference/kotlin/androidx/test/uiautomator/watcher/WatcherRegistration#close())`()` |\n| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [unregister](/reference/kotlin/androidx/test/uiautomator/watcher/WatcherRegistration#unregister())`()` Unregisters the dialog associated to this registration. |\n\nPublic functions\n----------------\n\n### close\n\nAdded in [2.4.0-alpha06](/jetpack/androidx/releases/test-uiautomator#2.4.0-alpha06) \n\n```\nopen fun close(): Unit\n``` \n\n### unregister\n\nAdded in [2.4.0-alpha06](/jetpack/androidx/releases/test-uiautomator#2.4.0-alpha06) \n\n```\nfun unregister(): Unit\n```\n\nUnregisters the dialog associated to this registration."]]