# RemoteInteractionRegistry

# RemoteInteractionRegistry

Artifact:[androidx.test.espresso:espresso-core](https://developer.android.com/jetpack/androidx/releases/test-espresso)  
[View Source](https://cs.android.com/search?q=file:androidx/test/espresso/remote/RemoteInteractionRegistry.java+class:androidx.test.espresso.remote.RemoteInteractionRegistry)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/espresso/remote/RemoteInteractionRegistry "View this page in Java")

<br />

```
class RemoteInteractionRegistry
```

<br />

*** ** * ** ***

An exposed registry instance to make it easy for callers to get a hold of Remote Interaction

## Summary

|                                                         ### Public functions                                                         |
|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[RemoteInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteraction)`!` | [getInstance](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteractionRegistry#getInstance())`()` Returns the[RemoteInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteraction)                                                                                                                   |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                          | [registerInstance](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteractionRegistry#registerInstance(androidx.test.espresso.remote.RemoteInteraction))`(remoteInteraction: `[RemoteInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteraction)`!)` Stores the remote interaction in the registry. |

## Public functions

### getInstance

```
java-static fun getInstance(): RemoteInteraction!
```

Returns the[RemoteInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteraction)

This remote interaction is not guaranteed to be present under all instrumentations.  

|                                                        Returns                                                         |
|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RemoteInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteraction)`!` | RemoteInteraction the remote interaction for this application. If no remote interaction has been registered a[NoopRemoteInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/NoopRemoteInteraction)will be returned. |

### registerInstance

```
java-static fun registerInstance(remoteInteraction: RemoteInteraction!): Unit
```

Stores the remote interaction in the registry.

This is a global registry - so be aware of the impact of calling this method!  

|                                                                 Parameters                                                                  |
|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| `remoteInteraction: `[RemoteInteraction](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/RemoteInteraction)`!` | the remote interaction for this application. \<@code\>Nullde-registers any existing monitor. |