---
title: Device
description: Provides information about the device.
---

Provides information about the device.

Reads information about the current device and its screen.

## Methods

### batteryLevel()

Current battery level.

```typescript
static batteryLevel(): number
```

The value is in percentage ranging between 0 and 1.

#### Return value

**`number`**



### isCharging()

Whether the device is being charged.

```typescript
static isCharging(): bool
```

#### Return value

**`bool`**



### isDischarging()

Whether the device is being not plugged into power and thus discharging.

```typescript
static isDischarging(): bool
```

#### Return value

**`bool`**



### isFaceDown()

Whether the device is lying parallel to the ground with the screen facing downwards.

```typescript
static isFaceDown(): bool
```

#### Return value

**`bool`**



### isFaceUp()

Whether the device is lying parallel to the ground with the screen facing upwards.

```typescript
static isFaceUp(): bool
```

#### Return value

**`bool`**



### isFullyCharged()

Whether the device is fully charged.

```typescript
static isFullyCharged(): bool
```

#### Return value

**`bool`**



### isInLandscapeLeft()

Whether the device is in landscape with the home button or home indicator on the right side.

```typescript
static isInLandscapeLeft(): bool
```

#### Return value

**`bool`**



### isInLandscapeRight()

Whether the device is in landscape with the home button or home indicator on the left side.

```typescript
static isInLandscapeRight(): bool
```

#### Return value

**`bool`**



### isInPortrait()

Whether the device is in portrait with the home button or home indicator at the bottom.

```typescript
static isInPortrait(): bool
```

#### Return value

**`bool`**



### isInPortraitUpsideDown()

Whether the device is in portrait but upside down with the home button or home indicator at the top.

```typescript
static isInPortraitUpsideDown(): bool
```

#### Return value

**`bool`**



### isPad()

Whether the device is a pad.

```typescript
static isPad(): bool
```

You can use this property to choose behavior of a script depending on
whether its running on a phone or a pad.

#### Return value

**`bool`**



### isPhone()

Whether the device is a phone.

```typescript
static isPhone(): bool
```

You can use this property to choose behavior of a script depending on
whether its running on a phone or a pad.

#### Return value

**`bool`**



### isUsingDarkAppearance()

Whether the device is using dark appearance.

```typescript
static isUsingDarkAppearance(): bool
```

When running in the app, this reflects Scriptable's current appearance, including the theme in Settings.

This API is not supported in widgets.

#### Return value

**`bool`**



### language()

Identifier for the device language.

```typescript
static language(): string
```

#### Return value

**`string`**



### locale()

Identifier for the device locale.

```typescript
static locale(): string
```

#### Return value

**`string`**



### model()

Model of the device, e.g. "iPhone".

```typescript
static model(): string
```

#### Return value

**`string`**



### name()

Name identifying the device.

```typescript
static name(): string
```

You can find and edit the name of your device in the system settings.

#### Return value

**`string`**



### preferredLanguages()

The preferred langauges.

```typescript
static preferredLanguages(): [string]
```

The list is ordered according to the language preferences specified in the system settings.

#### Return value

**`[string]`**



### screenBrightness()

Brightness of the screen in percentage.

```typescript
static screenBrightness(): number
```

The value range from 0 to 1. To set the screen brightness, refer to the `setScreenBrightness()` function.

#### Return value

**`number`**



### screenResolution()

Resolution of the screen.

```typescript
static screenResolution(): Size
```

The value is measured in pixels. The value does not take the rotation of the deviec into account.

#### Return value

**`Size`**



### screenScale()

Scale of the screen.

```typescript
static screenScale(): number
```

Standard resolution displays have a scale of 1.0 where one point on the screen equals one pixel. Retina displays will have a scale factor of 2.0 or 3.0 where one point on the screen is four or nine pixels, respectively.

#### Return value

**`number`**



### screenSize()

Size of the screen.

```typescript
static screenSize(): Size
```

The value is measured in points. For an explanation of the relationship between
points and pixels, see the documentation of the `screenScale()` method.
The value takes the device rotation into account, so the value will vary between portrait and landscape.

#### Return value

**`Size`**



<span id="setscreenbrightness" class="api-anchor"></span>

### setScreenBrightness(percentage)

Sets the brightness of the screen.

```typescript
static setScreenBrightness(percentage: number)
```

The value range from 0 to 1. To get the screen brightness, refer to the `screenBrightness()` function.

#### Parameters

**`percentage` `number`**

Percentage to set the screen brightness to. Value between 0 and 1.

### systemName()

Name of the operating system:

```typescript
static systemName(): string
```

#### Return value

**`string`**



### systemVersion()

Version of the operating system.

```typescript
static systemVersion(): string
```

#### Return value

**`string`**



### volume()

The device volume.

```typescript
static volume(): number
```

The value range from 0 to 1.

#### Return value

**`number`**