public final class RecorderCommands


Allows running the screen record android utility to record the screen.

Summary

Public methods

final @NonNull Recording
start(
    @NonNull File outputFile,
    int width,
    int height,
    @IntRange(from = 0) int bitRateMb
)

Starts the recording.

Public methods

start

Added in 2.4.0-beta01
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.