UiAutomation.WaitForIdle(Int64, Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Waits for the accessibility event stream to become idle, which is not to
have received an accessibility event within idleTimeoutMillis.
[Android.Runtime.Register("waitForIdle", "(JJ)V", "")]
public void WaitForIdle(long idleTimeoutMillis, long globalTimeoutMillis);
[<Android.Runtime.Register("waitForIdle", "(JJ)V", "")>]
member this.WaitForIdle : int64 * int64 -> unit
Parameters
- idleTimeoutMillis
- Int64
The timeout in milliseconds between two events to consider the device idle.
- globalTimeoutMillis
- Int64
The maximal global timeout in milliseconds in which to wait for an idle state.
- Attributes
Remarks
Waits for the accessibility event stream to become idle, which is not to have received an accessibility event within idleTimeoutMillis. The total time spent to wait for an idle accessibility event stream is bounded by the globalTimeoutMillis.
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 2026-08-03 UTC.
Throws: IllegalStateException If the connection to the accessibility subsystem is not established.
Throws: TimeoutException If no idle state was detected within globalTimeoutMillis.
Android reference for android.app.UiAutomation.waitForIdle.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.