# IdlingUiController

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/base/IdlingUiController#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/base/IdlingUiController#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/base/IdlingUiController#)  

# IdlingUiController

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


interface
IdlingUiController
`  
`


implements

`[UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)`


`

|-------------------------------------------------------|
| android.support.test.espresso.base.IdlingUiController |

<br />

*** ** * ** ***

Similar to[UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)but with one additional method that enables getting an instance of[IdlingResourceRegistry](https://developer.android.com/reference/android/support/test/espresso/base/IdlingResourceRegistry). For instance, the registry can then be used by[ViewAction](https://developer.android.com/reference/android/support/test/espresso/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.

## Summary

|                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                     ||
|-----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[IdlingResourceRegistry](https://developer.android.com/reference/android/support/test/espresso/base/IdlingResourceRegistry) | ` `[getIdlingResourceRegistry](https://developer.android.com/reference/android/support/test/espresso/base/IdlingUiController#getIdlingResourceRegistry())`() ` Returns an instance of[IdlingResourceRegistry](https://developer.android.com/reference/android/support/test/espresso/base/IdlingResourceRegistry). |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/base/IdlingUiController#)From interface` `[android.support.test.espresso.UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)` ` |---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[injectKeyEvent](https://developer.android.com/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](https://developer.android.com/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](https://developer.android.com/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](https://developer.android.com/reference/android/support/test/espresso/UiController#loopMainThreadForAtLeast(long))`(long millisDelay) ` Loops the main thread for a specified period of time.                                                                                                                                | | ` abstract void`    | ` `[loopMainThreadUntilIdle](https://developer.android.com/reference/android/support/test/espresso/UiController#loopMainThreadUntilIdle())`() ` Loops the main thread until the application goes idle.                                                                                                                                                     | ||

## Public methods

### getIdlingResourceRegistry

```
IdlingResourceRegistry getIdlingResourceRegistry ()
```

Returns an instance of[IdlingResourceRegistry](https://developer.android.com/reference/android/support/test/espresso/base/IdlingResourceRegistry).

<br />

|                                                               Returns                                                               ||
|-----------------------------------------------------------------------------------------------------------------------------|--------|
| [IdlingResourceRegistry](https://developer.android.com/reference/android/support/test/espresso/base/IdlingResourceRegistry) | <br /> |

-

  ## Annotations

  - [Default](https://developer.android.com/reference/android/support/test/espresso/base/Default)
  - [MainThread](https://developer.android.com/reference/android/support/test/espresso/base/MainThread)
  - [RootViewPickerScope](https://developer.android.com/reference/android/support/test/espresso/base/RootViewPickerScope)
-

  ## Interfaces

  - [ActiveRootLister](https://developer.android.com/reference/android/support/test/espresso/base/ActiveRootLister)
  - [IdlingUiController](https://developer.android.com/reference/android/support/test/espresso/base/IdlingUiController)
  - [InterruptableUiController](https://developer.android.com/reference/android/support/test/espresso/base/InterruptableUiController)
-

  ## Classes

  - [DefaultFailureHandler](https://developer.android.com/reference/android/support/test/espresso/base/DefaultFailureHandler)
  - [IdlingResourceRegistry](https://developer.android.com/reference/android/support/test/espresso/base/IdlingResourceRegistry)
  - [RootViewPicker](https://developer.android.com/reference/android/support/test/espresso/base/RootViewPicker)
  - [ViewFinderImpl](https://developer.android.com/reference/android/support/test/espresso/base/ViewFinderImpl)