Create a session
platform: "android". Use id with lifecycle, control, screenshot, and log
operations; use url for the signed interactive stream.
For full runnable SDK source, see
newly-app/run-cloud-examples/sdk-ios-android.
Configure the session
If
--inactivity-timeout is omitted, run.cloud uses a 60-second inactivity
timeout. Set it to none to disable inactivity auto-close.
Android sessions use the available emulator pool. Install your own development
APK when your app needs a specific native runtime. The APK must support the
emulator’s Android version and CPU architecture.
Install an app
Try the onboarding app without building an Android project:Open URLs and deep links
VIEW handler, normally the browser. A
custom scheme resolves the exported activity that registered it. The success
result identifies the session, device, and lease and echoes the complete input
URI without normalizing its encoding. See
Open URLs and Deep Links for authentication, the REST
endpoint, a complete encoded example, and platform-specific errors.
Control the app
The CLI and SDK use normalized display coordinates from 0 to 1, with the origin at the top-left:On-screen keyboard
Every Android session has a hardware keyboard attached, and the viewer,type-text, and press-key deliver input as hardware keystrokes. The on-screen
keyboard therefore gets out of the way by default, as it does on a phone with a
keyboard connected: tap a text field and Android shows the on-screen keyboard,
then the first hardware keystroke hides it and typing continues in the field.
The per-session setting is hideSoftKeyboardOnHardwareInput, default true.
With false, the on-screen keyboard stays visible while you type and the typed
text still reaches the app. The setting applies to the running session without a
restart, and a released session’s emulator returns to the default.
Inspect accessibility
Read the current nested hierarchy without exposing the signed viewer URL:Capture a screenshot
Capture the current Android emulator display as PNG bytes:image/png and are never cached.
The maintained
Android app screenshot example
builds a native fixture, installs it, validates the PNG, and releases the
session:
screenshots/run-cloud-proof.png. Building from source requires JDK
17 or newer and Android SDK 35 or newer; pass --app <path> to use a prebuilt
APK.
Record screen video
Start an MP4 capture, stop it, and download it through the authenticated API:cloud.android.startRecording,
getRecording, listRecordings, stopRecording, and downloadRecording.
See Record a Simulator for lifecycle,
idempotency, retention, release, and failure behavior.
Read emulator logs
Read retainedlogcat entries from the current lease, including the app,
system, and crash buffers, or follow new entries:
--tail values from 1 to 1,000. --follow streams only new
entries. Add --json for structured snapshot output or newline-delimited JSON
while following. Snapshot JSON includes since, capturedAt, entries, and
truncated. Snapshot and stream responses are never cached.
Inject camera and microphone input
Start the installed app’s camera or microphone receiver, then inject a deterministic prerecorded source:runcloud asset delete or cloud.assets.delete() when
the proof is complete.
Inspect sessions
list shows active sessions by default. Pass --all to include released
sessions.
Release the session
runcloud android delete "$SESSION_ID" --save-state --wait and start the next one
with --restore-state. See Save and restore simulator state.
Explicit release charges the final started minute and closes the Android
emulator session. If the organization reaches its run.cloud credit ceiling, active sessions are
closed automatically.