---
title: "A button outside the app: controls"
description: "app.json's controls are buttons outside the app (Control Center, the Lock Screen, the Action button, a Quick Settings tile) that open a location or run a tool."
modificationDate: "2026-11-23"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A button outside the app: controls

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/recipes/system-controls: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

A control is a button the system draws outside the app: in Control Center,
on the Lock Screen or the Action button (iOS and iPadOS 18 and later), or as
a Quick Settings tile (Android 10 and later). A press opens one of the app's
locations or runs one of its `tool`s. Every rule and omission:
[Controls](https://exact.expo.dev/reference/developer/controls-control-center-the-lock-screen-the-action-button-quick-settings.md).

```prompt Use this recipe in my app
Make the Exact app in this folder do what this recipe describes. Use https://github.com/expo/exact/blob/main/docs/recipes/system-controls.md as the source for each step. The Exact checkout has the same page at docs/recipes/system-controls.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. Read the recipe. If it leaves a choice that I did not make (which screen, which data, which platforms), propose one and ask me before you write code.
3. Do what the recipe says, in its order, with its tags, properties, functions and grants. Its component, state and URL names are examples. Change nothing else in the app.
4. Add a test in app.test.contract for each thing a person does that you changed. Copy the recipe's `contract-test` block where it has one. A drive operation the recipe shows (`call`, a ticket answer such as `tap @N accepted`) is not a test step: run it with `bun exact.mjs agent`.
5. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 6) and report it; do not keep trying.
6. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
7. Tell me what you changed, what the tests and checks reported, and what I must still do by hand.
```

```json
"controls": [
  { "kind": "record", "title": "Record an idea", "symbol": "mic.fill",
    "tool": "startRecording", "authentication": "always" },
  { "kind": "inbox", "title": "Inbox", "symbol": "tray", "url": "/inbox" }
]
```

A tool control's tool is an ordinary `tool` line with no required
parameter. Its press is the person's action (origin `action`), not the app
in front: it may write or start a Live Activity, but never asks for a
permission, opens the camera or starts speech recognition, and what it
leaves running (a countdown, a `then`) keeps those limits.

## Recording from a control

`apps/recorder` is the example (`startRecording` and what follows it): it
starts the declared `recording` Live Activity, then on its answer
`getUserMedia(audio=true)`, then `startMediaRecorder` into
`app:/data/takes/`, and `fails when not pressedTake` unless a take records.

- **Permission.** A press never prompts. With the microphone not allowed,
  `getUserMedia` fails `NotAllowedError` and the app asks from its own
  Record button. On Android the Live Activity is a notification, so with
  notifications off it fails too, and Recorder shows a row that asks
  (`requestNotificationPermission()`).
- **A failed start.** A failed `getUserMedia` dismisses the activity; a
  recorder that did not start stops the track and forgets the take.
- **Filing the take.** Stopping the recorder answers its file, which the app
  files, then ends the activity.

On Android the tile opens the app and the press records once it is in
front, since a tile grants no microphone. Another tile, leaving the app or
the screen turning off ends the press; a take it started records on. On a
Lock Screen with a PIN an `always` recording tile is refused; a `required`
one asks for the PIN, then opens the app. On iOS a locked-phone take awaits
a device run; until then only `EXACT_QUALIFY_CONTROLS=1` builds offer it.

## On Android

The tile's service is `ExactControl_<kind in UTF-8 hex>` (`record` is
`7265636f7264`):

```sh
bun exact.mjs android            # build and install
adb shell cmd statusbar add-tile com.exact.recorder/dev.exact.app.ExactControl_7265636f7264
adb shell cmd statusbar click-tile com.exact.recorder/dev.exact.app.ExactControl_7265636f7264
```
