# System (/docs/products/dash-dots/reference/dash-api/system)

## `dash.system.info`

```ts
dash.system.info(callOptions?: CallOptions): DashRequest<SystemInfo>
```

Facts about the phone and Dash: the platform, language, region, time zone and versions. Nothing in it identifies the person or the phone.

Types: [`SystemInfo`](/docs/products/dash-dots/reference/dash-api/system#systeminfo)

## `dash.system.vibrate`

```ts
dash.system.vibrate(options?: VibrateOptions, callOptions?: CallOptions): DashRequest<void>
```

Plays a short vibration. Resolves once it's done.

Types: [`VibrateOptions`](/docs/products/dash-dots/reference/dash-api/system#vibrateoptions)

## `dash.system.torch`

```ts
dash.system.torch(on: boolean, callOptions?: CallOptions): DashRequest<void>
```

Turns the torch on or off. Rejects with `unsupported` on a device without one.

## `dash.system.keepAwake`

```ts
dash.system.keepAwake(on: boolean, callOptions?: CallOptions): DashRequest<void>
```

Keeps the screen from dimming and locking while the dot shows, such as while a ticket's QR code is up. Dash undoes it when the dot closes.

## `dash.system.brightness`

```ts
dash.system.brightness(level: BrightnessLevel, callOptions?: CallOptions): DashRequest<void>
```

`max` makes the screen as bright as it goes, so a scanner can read a QR code on it, and `normal` puts it back. Dash puts it back too when the dot closes or the person leaves the app.

Types: [`BrightnessLevel`](/docs/products/dash-dots/reference/dash-api/system#brightnesslevel)

## `dash.system.copyText`

```ts
dash.system.copyText(text: string, callOptions?: CallOptions): DashRequest<void>
```

Copies `text` for the person to paste somewhere else.

## `dash.system.share`

```ts
dash.system.share(options: ShareOptions, callOptions?: CallOptions): DashRequest<void>
```

Opens the device's share sheet. Resolves once it shows.

Types: [`ShareOptions`](/docs/products/dash-dots/reference/dash-api/system#shareoptions)

## `dash.system.dial`

```ts
dash.system.dial(number: string, callOptions?: CallOptions): DashRequest<void>
```

Opens the phone's dialer with `number` ready, such as "+232 76 123456" or a USSD code such as "\*715#". The person taps Call. Spaces and dashes are fine; anything else but digits, +, \* and # rejects with `invalid`. For a code, Dash asks the person first, and rejects with `cancelled` if they say no. Codes that set up call forwarding, such as "\**21*…#", reject with `denied`.

## `dash.system.openUrl`

```ts
dash.system.openUrl(url: string, callOptions?: CallOptions): DashRequest<void>
```

Opens an https address in the device's browser. Any other address rejects with `invalid`.

## `dash.system.delay`

```ts
dash.system.delay(milliseconds: number, callOptions?: CallOptions): DashRequest<void>
```

Waits `milliseconds`, then resolves. A dot has no `setTimeout`: use this to pause, as between checks on a payment.

## Types

### `Platform`

```ts
type Platform = 'ios' | 'android' | 'simulator';
```

### `SystemInfo`

| Field         | Type                                                                      | What it is                                                                                      |
| ------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `platform`    | [`Platform`](/docs/products/dash-dots/reference/dash-api/system#platform) |                                                                                                 |
| `osVersion`   | `string`                                                                  | Such as "18.2" on iOS or "15" on Android.                                                       |
| `language`    | `string`                                                                  | The person's language, such as "en".                                                            |
| `region`      | `string \| null`                                                          | The person's region, such as "SL", or null if Dash doesn't know it.                             |
| `timeZone`    | `string`                                                                  | Such as "Africa/Freetown".                                                                      |
| `dashVersion` | `string`                                                                  | The version of Dash the dot runs in, such as "2.4.0". To check for a call, use `dash.supports`. |
| `apiVersions` | `string[]`                                                                | The Dash API versions it offers, one for each major it supports, such as \["1.0"].              |

### `VibrationStyle`

```ts
type VibrationStyle = 'light' | 'medium' | 'heavy' | 'success' | 'warning' | 'error';
```

### `VibrateOptions`

| Field              | Type                                                                                  | What it is         |
| ------------------ | ------------------------------------------------------------------------------------- | ------------------ |
| `style` (optional) | [`VibrationStyle`](/docs/products/dash-dots/reference/dash-api/system#vibrationstyle) | Default: `medium`. |

### `BrightnessLevel`

```ts
type BrightnessLevel = 'max' | 'normal';
```

### `ShareOptions`

Give at least one of `text`, `url` and `file`.

| Field              | Type                                                                   | What it is                                       |
| ------------------ | ---------------------------------------------------------------------- | ------------------------------------------------ |
| `title` (optional) | `string`                                                               | A subject, for apps that use one, such as email. |
| `text` (optional)  | `string`                                                               |                                                  |
| `url` (optional)   | `string`                                                               |                                                  |
| `file` (optional)  | [`DotFile`](/docs/products/dash-dots/reference/dash-api/files#dotfile) |                                                  |
