AdbBackend class
Android emulator / device backend over adb shell input.
- Implemented types
Constructors
- AdbBackend({required String deviceSerial, String adbPath = 'adb', ProcessRunner run = boundedRun, AndroidServer? server})
Properties
- adbPath → String
-
final
- capabilities → BackendCapabilities
-
no setteroverride
- deviceSerial → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String
-
no setteroverride
- run → ProcessRunner
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server ↔ AndroidServer?
-
glint's resident server; input goes through it while it answers, else through
adb shell input.getter/setter pair - serverProblem ↔ String?
-
Why the last input fell back from the server to
adb shell input.getter/setter pair - systemTouches ↔ EmulatorTouches?
-
The emulator's own touchscreen, set while touches are shown so Android draws each one; pointer input goes through it instead of the server.
getter/setter pair
Methods
-
close(
) → Future< void> -
Releases helper processes this backend started.
override
-
edgeSwipe(
ScreenEdge edge) → Future< void> -
A system gesture from
edge(back, home, app switcher, Control Center, Notification Center).override -
lockState(
) → Future< bool?> -
Not read on Android yet; callers fall back to the app lifecycle.
override
-
longPress(
{required int physicalX, required int physicalY, required int durationMs}) → Future< void> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pinch(
{required int physicalX, required int physicalY, required double scale, int durationMs = 400}) → Future< void> -
Two fingers around a physical point, spreading or closing until their span is
scaletimes what it was.override -
pressHardwareButton(
HardwareButton button) → Future< void> -
override
-
pressKey(
KeyName key, {int count = 1, Set< KeyModifier> modifiers = const {}}) → Future<void> -
Presses
keycounttimes, each press bracketed bymodifiers. Throws UnsupportedBackendAction when the backend has no keyboard.override -
screenshot(
String path) → Future< ScreenshotResult> -
Capture a PNG to
pathfor device-mode perception; also the coordinate reference (ratio = pixel / size).override -
selectAll(
) → Future< void> -
Selects all text in the focused field (cmd+A on iOS, ctrl+A on Android).
override
-
startRecording(
String path) → Future< ScreenRecording> -
Starts recording the display into
path. Throws UnsupportedBackendAction when the backend cannot record.override -
swipe(
{required int physicalX1, required int physicalY1, required int physicalX2, required int physicalY2, required int durationMs, int holdMs = 0}) → Future< void> -
override
-
takeInput(
) → InputReport? -
How the last input was delivered, cleared on read; null for single-path backends.
override
-
tap(
{required int physicalX, required int physicalY}) → Future< void> -
override
-
tapSequence(
List< ({int x, int y})> points, {required int intervalMs}) → Future<void> -
Taps each physical point in order with
intervalMsbetween taps.override -
toString(
) → String -
A string representation of this object.
inherited
-
typeText(
String text, {int? keyDelayMs}) → Future< void> -
Through the server any text types (key events, or the field's text for characters no key makes);
adb shell inputis Latin only.override -
warm(
) → Future< void> -
Starts slow connections ahead of the first input, so it lands without a cold start; failures surface on that input instead.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited