# EmulatorControl

[View Source](https://cs.android.com/search?q=file:com/android/build/api/dsl/EmulatorControl.kt+class:com.android.build.api.dsl.EmulatorControl) Added in 8.1.0


```
@Incubating
interface EmulatorControl
```

<br />

*** ** * ** ***

Options for configuring Android Emulator Access

When enabled, it will be possible to control the emulator through gRPC.

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/EmulatorControl#allowedEndpoints()` Set of endpoints to which access is granted, this is only required if the method you wish to access is in the set of methods that require authorization as defined in emulator_access.json used by the emulator this test is running on. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/EmulatorControl#enable()` True if emulator control should be enabled. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/EmulatorControl#secondsValid()` The duration in seconds the test can access the gRPC endpoint. |

## Public properties

### allowedEndpoints

Added in 8.1.0

```
val allowedEndpoints: MutableSet<String>
```

Set of endpoints to which access is granted, this is only required if the method you wish to access is in the set of methods that require authorization as defined in emulator_access.json used by the emulator this test is running on.

Details on which endpoints and what considerations are taken to make an endpoint accessible is described in go/emu-grpc-integration.

### enable

Added in 8.1.0

```
var enable: Boolean
```

True if emulator control should be enabled.

### secondsValid

Added in 8.1.0

```
var secondsValid: Int
```

The duration in seconds the test can access the gRPC endpoint. The default value is 3600 (one hour).