> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simular.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AndroidExtras

> Phone-only operations of an Android [].

Phone-only operations of an Android \[`Machine`]. Obtain via
\[`Machine.asAndroid`].

Cross-platform operations (`apps`, mouse, clipboard, …) live on
\[`Machine`] itself; this escape hatch is only for controls that have
no desktop counterpart (status bar, orientation, package enablement,
touch gestures with explicit timing).

## Constructor

```typescript
AndroidExtras(): AndroidExtras
```

### Returns

`AndroidExtras`

## Properties

<ResponseField name={"serial"} type={"string"} required>
  The adb serial (`host:port`) this device is connected through.
</ResponseField>

## Methods

### collapseShade()

```typescript
collapseShade(): void
```

Collapse the notification shade / quick-settings panel.

### landscape()

```typescript
landscape(): void
```

Lock the screen to landscape orientation.

The freeze overrides auto-rotate until the orientation is set again.

### notifications()

```typescript
notifications(): void
```

Open the notification shade.

### portrait()

```typescript
portrait(): void
```

Lock the screen to portrait orientation.

The freeze overrides auto-rotate until the orientation is set again.

### quickSettings()

```typescript
quickSettings(): void
```

Open the quick-settings panel.

### setPackageEnabled()

```typescript
setPackageEnabled(package: string, enabled: boolean): void
```

Enable or disable an installed package.

Disabling uses the unprivileged, per-user reversible form; `enabled:
true` reverses it.

#### Parameters

<ResponseField name={"package"} type={"string"} required />

<ResponseField name={"enabled"} type={"boolean"} required />

### swipe()

```typescript
swipe(fromX: number, fromY: number, toX: number, toY: number, durationMs: number): void
```

Swipe (touch-drag) from `(fromX, fromY)` to `(toX, toY)`, holding
the finger down for `durationMs` while it travels. Coordinates are
absolute device pixels in the current rotation's space.

The whole gesture ships to the device as one atomic pointer
sequence, so nothing is held open across calls. The duration decides
what the gesture means to the app: brief (well under \~200ms) reads
as a fling that keeps scrolling with momentum, longer as a
deliberate drag that stops where the finger stops.

For a plain drag the cross-platform mouse lowering
(\[`Machine.moveMouse`] + \[`Machine.mouseButton`] press/release) is
equivalent and portable — it synthesizes this same gesture at a
fixed 200ms. Reach for this method only when the timing matters.

#### Parameters

<ResponseField name={"fromX"} type={"number"} required />

<ResponseField name={"fromY"} type={"number"} required />

<ResponseField name={"toX"} type={"number"} required />

<ResponseField name={"toY"} type={"number"} required />

<ResponseField name={"durationMs"} type={"number"} required />
