Type something to search...
Run repeatable Android workflows with longarm batch tasks

Run repeatable Android workflows with longarm batch tasks

longarm now supports batch tasks: saved Android automation flows that can run more than one action at a time.

Instead of sending a separate request for every tap, delay, app launch, or screenshot, you can group those steps into one named task. Run it from the Batch tab when you are on the device, trigger it over the HTTP API from a script, or let an MCP-compatible agent list, save, run, and inspect batch tasks as tools.

longarm batch tasks screen showing saved repeatable Android automation flows


What batch tasks add

The first version of longarm focused on direct remote control: start the local HTTP server, send a gesture request, capture a screenshot, and keep the device visible from your desktop workflow.

Batch tasks make that control repeatable.

A batch task can include:

  • taps, long-presses, swipes, pinches, rotations, and two-finger swipes
  • delays between steps
  • screenshots during the run
  • app launches by Android package name
  • Android intents for deeper app or system flows
  • variables for values reused across steps
  • loops for repeated child steps

That means the useful unit is no longer only “tap this coordinate”. It can be “open this app, wait for it to load, scroll the feed, capture the result, then keep a run record.”

Built for real workflows

Batch tasks are useful when the same Android flow needs to be repeated many times:

  • collect the same screenshots after each app build
  • drive a QA smoke test on a real device
  • open a target app and move it into a known state before manual testing
  • automate setup steps that are too device-specific for an emulator
  • give an AI agent a higher-level action instead of many fragile individual gestures

Each run is tracked in history with status, progress, messages, and captured screenshots. The run starts asynchronously and returns a runId, so scripts and agents can poll history without keeping a long HTTP request open.

Only one batch task runs at a time. If another task is already active, longarm returns a conflict instead of mixing two automation flows on the same screen.

Run from the app, HTTP, or MCP

The Batch tab is the easiest way to create and run tasks directly on the device. It is useful for building a flow once, naming it, and replaying it later.

The HTTP API is better when the task belongs to a desktop script, CI helper, or local automation tool. You can create saved tasks with /api/batch, run a saved task with /api/batch/<id>/run, or run an inline task immediately with /api/batch/run.

The MCP server exposes the same concept to AI agents. Tools such as batch_list, batch_save, batch_run, batch_run_inline, batch_status, and batch_history_get let an agent work with complete Android workflows instead of manually composing every low-level screen action.

Small Python example

This example starts an inline batch task that opens Android Settings, waits for it to load, captures a screenshot, and polls the run history until the task finishes.

Replace BASE_URL with the address shown in longarm. If your server uses an auth token, replace TOKEN with the token shown in the app.

import time
import requests

BASE_URL = "http://192.168.1.10:8080"
TOKEN = "secret"

headers = {
    "Authorization": f"Bearer {TOKEN}",
    "Content-Type": "application/json",
}

task = {
    "name": "Open Settings and capture",
    "steps": [
        {
            "type": "open_app",
            "params": {"packageName": "com.android.settings"},
            "delayAfterMs": 2000,
        },
        {
            "type": "screenshot",
            "params": {"scale": 1},
        },
    ],
}

run = requests.post(
    f"{BASE_URL}/api/batch/run",
    headers=headers,
    json=task,
    timeout=10,
).json()

run_id = run["runId"]
print("started", run_id)

while True:
    history = requests.get(
        f"{BASE_URL}/api/batch/history/{run_id}",
        headers=headers,
        timeout=10,
    ).json()

    print(history["status"], history.get("message", ""))

    if history["status"] != "processing":
        break

    time.sleep(1)

When the run finishes, the history entry includes progress and any screenshot references captured during the task. Screenshot file downloads and zip export are available from the history endpoints when longarm Plus is active.

Why it matters

Real-device automation often fails because every script has to rediscover the same setup steps. Batch tasks move those steps closer to the device and give them a stable name, a run history, and remote control surfaces through HTTP and MCP.

That makes longarm more practical for day-to-day Android automation: build a flow once, replay it from wherever you work, and keep the result visible enough to debug.

Get longarm on Google Play.

Related Posts

Learn Vocabulary Effortlessly with Infini Alchemy

Learn Vocabulary Effortlessly with Infini Alchemy

Are you looking for a fun and engaging game that can also help you learn new words? Look no further! Infini Alchemy is a creative alchemy game where you can combine basic elements like Water, Fire, Ea

read more
Master KET Vocabulary Through Alchemy: A New Learning Adventure

Master KET Vocabulary Through Alchemy: A New Learning Adventure

Infini Alchemy is an innovative web-based game that transforms vocabulary learning into an engaging alchemical adventure. By dragging and dropping elements to craft new items, players naturally absorb

read more
How to copy the formulas in ChatGPT response to word

How to copy the formulas in ChatGPT response to word

Copy the formulas in ChatGPT response to word, simply 3 steps:Copy the ChatGPT response as markdown (keep LaTeX formulas) Select the formulas in Word and insert as equation Convert LaTeX fo

read more
Real-Time Video Effects with GPU Acceleration

Real-Time Video Effects with GPU Acceleration

GPU rendering is now available in Sub Dimension Camera. This feature eliminates the need to wait for a video to "render" after recording. You can now preview and capture complex artistic filters in re

read more
See the World Differently: Camera Effects in Sub Dimension

See the World Differently: Camera Effects in Sub Dimension

Your camera captures moments. Effects transform them into art. Sub Dimension comes packed with real-time visual effects that apply live in the viewfinder — what you see is what you get, whether you'r

read more

Move Any Window to an Exact Position and Size

You've set up a perfect workflow: your code editor on the left, browser on the right, terminal at the bottom. Then you restart your machine and spend the next five minutes dragging windows back into p

read more

Let an AI Agent Resize a Window and Take the Screenshot

Screen automation is easiest to trust when the result is visible and repeatable. In this short demo, an AI agent uses the OverRec screen skill to find a browser window, resize it to an exact rectangle

read more
How to Screenshot a YouTube Video (or Any Video Site) with OverRec

How to Screenshot a YouTube Video (or Any Video Site) with OverRec

You're watching a tutorial, a product demo, or a live stream and you want a clean frame from the video — no browser toolbar, no tab bar, no distractions. Here are two ways to do it with OverRec. ![Yo

read more
Record Any Screen Region to GIF or MP4 with OverRec

Record Any Screen Region to GIF or MP4 with OverRec

Screen recording usually starts with a compromise: capture the whole monitor and crop it later, or wrestle with a recorder's region selector every time. OverRec now records the exact rectangle you dra

read more
longarm Is Now Available on Android

longarm Is Now Available on Android

longarm is now available on Android through Google Play. longarm turns an Android phone or tablet into a controllable remote endpoint for developers, testers, automation scripts, and AI agents. Start

read more
Give AI Agents Screen Control: OverRec's MCP Server

Give AI Agents Screen Control: OverRec's MCP Server

AI coding agents are good at reasoning about a task, but bad at touching the screen — finding a window, lining it up, and grabbing a clean screenshot has always meant gluing together ad-hoc scripts. O

read more
RESET-0:熵之建筑师 现已登陆 Android

RESET-0:熵之建筑师 现已登陆 Android

RESET-0:熵之建筑师现已通过 Google Play 登陆 Android 平台。 Android 版本将完整的宇宙增量旅程带到手机和平板设备。从量子涨落开始,自动化不断扩张的宇宙机器,推进到恒星形成与黑洞工业阶段,持续建设,直到熵只剩下一个选择:设计下一个宇宙。 [在 Google Play 上下载 RESET-0](https://play.google.com/store/apps

read more
longarm 现已登陆 Android

longarm 现已登陆 Android

longarm 现已通过 Google Play 登陆 Android。 longarm 可以把 Android 手机或平板变成一个可远程控制的端点,适合开发者、测试人员、自动化脚本和 AI Agent 使用。启动内置 HTTP 服务器,复制设备 URL,就可以从同一局域网中的另一台机器发送 API 请求。 [在 Google Play 上下载 longarm](https://play.go

read more
RESET-0: Entropy Architect Is Now Available on Android

RESET-0: Entropy Architect Is Now Available on Android

RESET-0: Entropy Architect is now available on Android through Google Play. The Android release brings the full cosmic incremental journey to phones and tablets. Begin with quantum fluctuations, auto

read more
RESET-0: Entropy Architect ya está disponible en Android

RESET-0: Entropy Architect ya está disponible en Android

RESET-0: Entropy Architect ya está disponible en Android a través de Google Play. La versión para Android lleva el viaje incremental cósmico completo a teléfonos y tablets. Empieza con fluctuaciones

read more
longarm ya está disponible en Android

longarm ya está disponible en Android

longarm ya está disponible en Android a través de Google Play. longarm convierte un teléfono o tablet Android en un endpoint remoto controlable para desarrolladores, testers, scripts de automatizació

read more
Automatiza flujos repetibles de Android con las tareas por lotes de longarm

Automatiza flujos repetibles de Android con las tareas por lotes de longarm

longarm ahora admite tareas por lotes: flujos de automatización de Android guardados que pueden ejecutar más de una acción a la vez. En lugar de enviar una solicitud separada para cada toque, pausa,

read more
使用 longarm 批处理任务运行可复用的 Android 工作流

使用 longarm 批处理任务运行可复用的 Android 工作流

longarm 现已支持批处理任务,也就是可保存、可一次执行多个动作的 Android 自动化流程。 你不再需要为每一次点击、延时、启动应用或截图分别发送请求,而是可以把这些步骤组合成一个具名任务。你可以在设备上的 Batch 标签页中运行它,也可以从脚本通过 HTTP API 触发,或者让兼容 MCP 的 AI Agent 以工具形式列出、保存、运行并检查批处理任务。 ![longarm 批

read more