Stay organized with collections
Save and categorize content based on your preferences.
public final class RecorderCommands
Allows running the screen record android utility to record the screen.
Summary
Public methods
public final @NonNull Recording start(
@NonNull File outputFile,
int width,
int height,
@IntRange(from = 0) int bitRateMb
)
Starts the recording.
| Parameters |
@NonNull File outputFile |
the output file where to write the recording.
|
int width |
the width of the screen in pixels.
|
int height |
the height of the screen in pixels.
|
@IntRange(from = 0) int bitRateMb |
the bitrate of the recording in Mb/s.
|
| Returns |
@NonNull Recording |
a running Recording.
When width, and height are unspecified, the recorder uses the display's native resolution (if supported) and 1280x720` when not. For more information, you can read the documentation here.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-02-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-02-11 UTC."],[],[]]