# Values

The small values calls return or take: an element's snapshot and bounds, an app's process,
a permission prompt, a toast, a notification, the foreground activity, and `Long` for intent
extras.

## <kbd>class</kbd> `ElementSnapshot`
The state of one node at one instant (``Element.snapshot()``). Text properties are None when the node has none. ``text`` is the raw accessibility text: on API 26+ an empty field reports its hint there and ``showing_hint`` is True. 

### <kbd>method</kbd> `ElementSnapshot.__init__`

```python
__init__(
    class_name: 'str | None',
    package_name: 'str | None',
    resource_name: 'str | None',
    text: 'str | None',
    content_description: 'str | None',
    hint: 'str | None',
    bounds: 'Bounds',
    checkable: 'bool',
    checked: 'bool',
    clickable: 'bool',
    enabled: 'bool',
    focusable: 'bool',
    focused: 'bool',
    long_clickable: 'bool',
    scrollable: 'bool',
    selected: 'bool',
    child_count: 'int',
    showing_hint: 'bool',
    actions: 'tuple[StandardAction, ...]' = (),
    custom_actions: 'tuple[str, ...]' = (),
    range: 'Range | None' = None
) → None
```

## <kbd>class</kbd> `Bounds`
A node's bounds in screen pixels. 

### <kbd>method</kbd> `Bounds.__init__`

```python
__init__(left: 'int', top: 'int', right: 'int', bottom: 'int') → None
```

---

#### <kbd>property</kbd> Bounds.center

---

#### <kbd>property</kbd> Bounds.height

---

#### <kbd>property</kbd> Bounds.width

## <kbd>class</kbd> `Range`
A range node's (SeekBar, Slider, RatingBar, ProgressBar) value and bounds, in its own units (``Element.set_progress``). 

### <kbd>method</kbd> `Range.__init__`

```python
__init__(type: 'RangeType', min: 'float', max: 'float', current: 'float') → None
```

## <kbd>class</kbd> `RangeType`
How a range node counts its value. 

## <kbd>class</kbd> `AppProcess`
A process of an app as the host sees it: PID plus the ``/proc`` start token that tells reused PIDs apart. 

### <kbd>method</kbd> `AppProcess.__init__`

```python
__init__(pid: 'int', start_token: 'str') → None
```

## <kbd>class</kbd> `PermissionPrompt`
A runtime-permission dialog on screen (``Device.await_permission_prompt``): the package of its window (what ``in_package`` scopes its other elements with), the choices it offers, in ``PermissionChoice`` order, and the location accuracies it lets the user pick (empty unless it asks for precise location). 

### <kbd>method</kbd> `PermissionPrompt.__init__`

```python
__init__(
    package_name: 'str',
    choices: 'tuple[PermissionChoice, ...]',
    accuracies: 'tuple[LocationAccuracy, ...]' = ()
) → None
```

## <kbd>class</kbd> `Toast`
A toast ``Device.await_toast`` saw: its text and the package that showed it (on Android 11+ a text toast is drawn by SystemUI but still reported under the app that posted it). 

### <kbd>method</kbd> `Toast.__init__`

```python
__init__(text: 'str', package_name: 'str') → None
```

## <kbd>class</kbd> `Notification`
An active notification (``Device.notifications``, ``Device.await_notification``): the package that posted it, its title and text (the ``android.title`` / ``android.text`` extras, ``None`` when it has none), the titles of its action buttons (what ``Device.open_notification``'s ``action`` names), whether a swipe dismisses it (``False`` for an ongoing one, such as a foreground service's), and when it was posted (UTC). 

### <kbd>method</kbd> `Notification.__init__`

```python
__init__(
    package_name: 'str',
    title: 'str | None',
    text: 'str | None',
    actions: 'tuple[str, ...]',
    clearable: 'bool',
    posted_at: 'datetime.datetime'
) → None
```

## <kbd>class</kbd> `ForegroundActivity`
The activity on top of the screen (``Device.foreground_activity``): its package and its fully qualified class name. 

### <kbd>method</kbd> `ForegroundActivity.__init__`

```python
__init__(package_name: 'str', class_name: 'str') → None
```

## <kbd>class</kbd> `Long`
An ``int`` sent as a 64-bit intent extra (``am start --el``), for an app that reads it with ``getLongExtra``: a plain ``int`` extra is 32-bit, and ``getLongExtra`` on it returns the default. ``App.launch(extras={"id": Long(42)})``. 

### <kbd>method</kbd> `Long.__init__`

```python
__init__(value: 'int') → None
```

