# 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)

*** ** * ** ***


```
public final class ScreenCommands
```

<br />

*** ** * ** ***

Commands about the current focused display.

## Summary

| ### Public methods |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/test/shell/command/ScreenCommands#isKeyboardVisible()()` Returns whether the keyboard is currently visible. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/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 methods

### isKeyboardVisible

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

```
public final boolean isKeyboardVisible()
```

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)

```
public final @NonNull String resumedActivityName()
```

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