Skip to main content

record

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Record the screen to a video: start, stop with a path to save it, or omit the action to ask whether a recording is running. These call app_record.

record​

public Map<String, Object> record(String action, String path)

Records the screen: action "start", or "stop" with a path to save the video; null asks whether one is running. Stop returns the file's frames and duration, read from its own header; a still screen is one frame on Android, which is not a failure. A relative path is this process's.

@param action "start", "stop", or null to ask whether one is running @param path where to save the video on stop, or null @return whether a recording is running, or on stop its frames and duration

Examples​

Start recording the screen​

device.record("start", null);

The same call from the command line, mobium record start, printed on an Android 15 emulator:

recording — stop it with action "stop" and a path

Stop, and save the video​

Map<String, Object> video = device.record("stop", "flow.mp4");
System.out.println(video.get("frames") + " frames");

The same call from the command line, mobium record stop -o flow.mp4, printed on an Android 15 emulator:

saved …/flow.mp4: 54 frames, 1.605s of video, recorded over 1.705s