addScreen

suspend fun addScreen(args: Emulation.AddScreenParameter, mode: CommandMode = CommandMode.DEFAULT): Emulation.AddScreenReturn

Add a new screen to the device. Only supported in headless mode.


suspend fun addScreen(left: Int, top: Int, width: Int, height: Int, workAreaInsets: Emulation.WorkAreaInsets? = null, devicePixelRatio: Double? = null, rotation: Int? = null, colorDepth: Int? = null, label: String? = null, isInternal: Boolean? = null): Emulation.AddScreenReturn

Add a new screen to the device. Only supported in headless mode.

Parameters

left

Offset of the left edge of the screen in pixels.

top

Offset of the top edge of the screen in pixels.

width

The width of the screen in pixels.

height

The height of the screen in pixels.

workAreaInsets

Specifies the screen's work area. Default is entire screen.

devicePixelRatio

Specifies the screen's device pixel ratio. Default is 1.

rotation

Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.

colorDepth

Specifies the screen's color depth in bits. Default is 24.

label

Specifies the descriptive label for the screen. Default is none.

isInternal

Indicates whether the screen is internal to the device or external, attached to the device. Default is false.