# Recording

Artifact: [androidx.test.uiautomator:uiautomator-shell](https://developer.android.com/jetpack/androidx/releases/test-uiautomator) [View Source](https://cs.android.com/search?q=file:androidx/test/shell/command/RecorderCommands.kt+class:androidx.test.shell.command.Recording) Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

*** ** * ** ***


```
class Recording : AutoCloseable
```

<br />

*** ** * ** ***

A recording started with `https://developer.android.com/reference/kotlin/androidx/test/shell/command/RecorderCommands#start(java.io.File,kotlin.Int,kotlin.Int,kotlin.Int)`. This interface allows awaits for completion, if a time limit was specified or force stop the recording.

## Summary

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/shell/command/Recording#close()()` Stops the current recording. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/shell/command/Recording#isRunning()()` Returns whether the recording is still running. |

## Public functions

### close

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
open fun close(): Unit
```

Stops the current recording.

Waits for up to `10 seconds` for the `recorder` process to stop.

### isRunning

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
fun isRunning(): Boolean
```

Returns whether the recording is still running.