A software interface that allows you to link MultiTimer with other apps together.
# Broadcast API Guide
MultiTimer exposes a broadcast-based API that allows external applications to control timers. This document explains how to send commands, read results, and integrate the API with automation tools such as Android Tasker.
## Overview
- Broadcast Action: `com.multitimer.api`
- Target Package: `com.persapps.multitimer`
- Receiver Class: `com.persapps.multitimer.id.br_i9fa`
- Response Extra: `result` (may hold command results)
Each command is delivered as a broadcast intent with the action above and the extras below.
## Command Extras
- `action` (required) – command to execute. Supported values are listed in [Commands](#commands).
- `value` (conditional) – additional value for some commands (e.g., seconds or count).
- `board` (optional) – name of the board to target.
- `instrument` (optional) – name of the timer or counter to target.
- `model` (optional) – timer model (`countdown`, `quick`, `interval`, `pomodoro`, `countup`, `stopwatch`, `counter`, `buttons`) used to filter target items.
- `state` (optional) – current state of the item (`inactive`, `running`, `waiting`, `completed`) used to filter target items.
`value` is required for `add_time` and `add_value`, and optional for `start`.
## Commands
- `tap`
- `run`
- `start` – optionally supply `value` with duration in seconds.
- `reset`
- `pause`
- `continue`
- `next`
- `lap`
- `add_time` – supply `value` with duration in seconds.
- `add_value` – supply `value` with an integer.
- `get_value` – returns the current value through the `result` extra in the result intent.
## Example: Android Tasker
1. Create a new Task in Tasker.
2. Add an Action → System → Send Intent.
3. Configure the intent:
- Action: `com.multitimer.api`
- Package: `com.persapps.multitimer`
- Class: `com.persapps.multitimer.id.br_i9fa`
- Extras: e.g., `action:start`, `instrument:Work`
- Target: *Broadcast Receiver*
4. Run the task to control MultiTimer from Tasker.
This setup allows Tasker to send broadcast commands, enabling rich automation scenarios.