Similar to UiController but with one additional method that enables getting an instance
of IdlingResourceRegistry. For instance, the registry can then be used by ViewAction to register and unregister idling resources before and
after performing the actual action.
This interface used for Espresso internals and shouldn't be called by external users.
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-02-10 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-02-10 UTC."],[],[],null,["# IdlingUiController\n\nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nIdlingUiController\n==================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\n\n\ninterface\nIdlingUiController\n`\n\n\n`\n\n\nimplements\n\n`[UiController](/reference/android/support/test/espresso/UiController)`\n\n\n`\n\n|-------------------------------------------------------|\n| android.support.test.espresso.base.IdlingUiController |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSimilar to [UiController](/reference/android/support/test/espresso/UiController) but with one additional method that enables getting an instance\nof [IdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingResourceRegistry). For instance, the registry can then be used by [ViewAction](/reference/android/support/test/espresso/ViewAction) to register and unregister idling resources before and\nafter performing the actual action.\n\nThis interface used for Espresso internals and shouldn't be called by external users.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[IdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingResourceRegistry) | ` `[getIdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingUiController#getIdlingResourceRegistry())`() ` Returns an instance of [IdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingResourceRegistry). |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[android.support.test.espresso.UiController](/reference/android/support/test/espresso/UiController)` ` |---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[injectKeyEvent](/reference/android/support/test/espresso/UiController#injectKeyEvent(android.view.KeyEvent))`(`[KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)` event) ` Injects a key event into the application. | | ` abstract boolean` | ` `[injectMotionEvent](/reference/android/support/test/espresso/UiController#injectMotionEvent(android.view.MotionEvent))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event) ` Injects a motion event into the application. | | ` abstract boolean` | ` `[injectString](/reference/android/support/test/espresso/UiController#injectString(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` str) ` Types a string into the application using series of [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)s. | | ` abstract void` | ` `[loopMainThreadForAtLeast](/reference/android/support/test/espresso/UiController#loopMainThreadForAtLeast(long))`(long millisDelay) ` Loops the main thread for a specified period of time. | | ` abstract void` | ` `[loopMainThreadUntilIdle](/reference/android/support/test/espresso/UiController#loopMainThreadUntilIdle())`() ` Loops the main thread until the application goes idle. | ||\n\nPublic methods\n--------------\n\n### getIdlingResourceRegistry\n\n```\nIdlingResourceRegistry getIdlingResourceRegistry ()\n```\n\nReturns an instance of [IdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingResourceRegistry).\n\n\u003cbr /\u003e\n\n| Returns ||\n|------------------------------------------------------------------------------------------------|--------|\n| [IdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingResourceRegistry) | \u003cbr /\u003e |\n\n-\n\n Annotations\n -----------\n\n - [Default](/reference/android/support/test/espresso/base/Default)\n - [MainThread](/reference/android/support/test/espresso/base/MainThread)\n - [RootViewPickerScope](/reference/android/support/test/espresso/base/RootViewPickerScope)\n-\n\n Interfaces\n ----------\n\n - [ActiveRootLister](/reference/android/support/test/espresso/base/ActiveRootLister)\n - [IdlingUiController](/reference/android/support/test/espresso/base/IdlingUiController)\n - [InterruptableUiController](/reference/android/support/test/espresso/base/InterruptableUiController)\n-\n\n Classes\n -------\n\n - [DefaultFailureHandler](/reference/android/support/test/espresso/base/DefaultFailureHandler)\n - [IdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingResourceRegistry)\n - [RootViewPicker](/reference/android/support/test/espresso/base/RootViewPicker)\n - [ViewFinderImpl](/reference/android/support/test/espresso/base/ViewFinderImpl)"]]