# ScreenCommands

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/ScreenCommands.kt+class:androidx.test.shell.command.ScreenCommands) Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

*** ** * ** ***


```
class ScreenCommands
```

<br />

*** ** * ** ***

Commands about the current focused display.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/shell/command/ScreenCommands#isKeyboardVisible()()` Returns whether the keyboard is currently visible. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/shell/command/ScreenCommands#resumedActivityName()()` Returns the full name of the resumed activity on the screen in the format / that the user last interacted with. |

## Public functions

### isKeyboardVisible

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

```
fun isKeyboardVisible(): Boolean
```

Returns whether the keyboard is currently visible.

### resumedActivityName

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

```
fun resumedActivityName(): String
```

Returns the full name of the resumed activity on the screen in the format / that the user last interacted with.