Android App
Overview
The OpenClaw Android app is a companion node that connects to the Gateway WebSocket and exposes Canvas, Chat, and Camera capabilities. Key points:- Role: Node (Android does not host the Gateway)
- Gateway required: Yes (run on macOS, Linux, or Windows via WSL2)
- Connection: WebSocket over mDNS/NSD discovery or manual host/port
- Foreground service: Keeps connection alive with persistent notification
- Shared sessions: Chat uses Gateway’s main session key (history shared across all clients)
Requirements
- Gateway: Running on macOS, Linux, or Windows (WSL2)
- Network:
- Same LAN with mDNS/NSD, or
- Tailscale tailnet with Wide-Area Bonjour (unicast DNS-SD), or
- Manual gateway host/port
- Android: minSdk 31 (Android 12+)
- CLI access: To gateway host for pairing approval
Installation
APK distribution
No public APK distribution yet. Build from source or request internal APK.
Build from source
Requirements:- Android Studio (latest stable)
- JDK 17+
- Android SDK (auto-detected at
~/Library/Android/sdkon macOS)
apps/android/app/build/outputs/apk/debug/openclaw-<version>-debug.apk
Node pairing
Quick start
- Start the Gateway:
-
In Android app:
- Open Settings
- Under Discovered Gateways, select your gateway and tap Connect
- If discovery fails, use Advanced → Manual Gateway (enter host + port)
- Approve pairing on gateway host:
- Verify connection:
Discovery
mDNS/NSD (LAN): Gateway advertises_openclaw-gw._tcp on local.. Android NSD lists these automatically.
Tailnet (cross-network): Use Wide-Area Bonjour / unicast DNS-SD:
- Set up DNS-SD zone (e.g.,
openclaw.internal.) on gateway host - Publish
_openclaw-gw._tcprecords via CoreDNS - Configure Tailscale split DNS for the domain
- Android app includes dnsjava for unicast DNS-SD support
Foreground service
The app keeps the Gateway connection alive via a foreground service:- Notification: Persistent with “Disconnect” action
- Service type:
dataSync|microphone|mediaProjection(AndroidManifest.xml:40) - Auto-start: Reconnects on app launch after successful pairing
- Manual control: Tap “Disconnect” in notification to stop service
Chat integration
The Android Chat panel uses Gateway’s main session key:- History shared with WebChat, macOS app, iOS app, and other clients
- Commands:
chat.history,chat.send,chat.subscribe - Push updates via
event:"chat"subscription - Session picker available to switch between Gateway sessions
Canvas support
Android node renders a WebView canvas:canvas.navigate: Load URL (use{"url":""}or{"url":"/"}for default scaffold)canvas.eval: Execute JavaScript in WebViewcanvas.snapshot: Capture canvas as imagecanvas.a2ui.push,canvas.a2ui.reset: A2UI protocol
- Path:
http://<gateway-host>:18789/__openclaw__/canvas/ - A2UI host:
http://<gateway-host>:18789/__openclaw__/a2ui/ - Live reload: Injects client that reloads on file changes in
~/.openclaw/workspace/canvas/
Camera support
Camera commands (foreground only, permission-gated):CAMERA(android.permission.CAMERA): For snap and clipRECORD_AUDIO(android.permission.RECORD_AUDIO): For clip withincludeAudio=true
Voice wake
Voice wake configuration available in Settings → Voice:- On-device wake word detection
- Configurable wake phrases
- Foreground-first reliability (background may suspend audio)
- Commands forwarded to Gateway
Permissions
Required permissions (AndroidManifest.xml:1-24):Network & discovery
INTERNET: Gateway WebSocket connectionACCESS_NETWORK_STATE: Connection monitoringNEARBY_WIFI_DEVICES(Android 13+): NSD discoveryACCESS_FINE_LOCATION(Android 12-): Required for NSD scanningACCESS_COARSE_LOCATION: Fallback locationACCESS_BACKGROUND_LOCATION: Background location (optional)
Foreground service
FOREGROUND_SERVICE: Base permissionFOREGROUND_SERVICE_DATA_SYNC: Gateway connectionFOREGROUND_SERVICE_MICROPHONE: Voice featuresFOREGROUND_SERVICE_MEDIA_PROJECTION: Screen capturePOST_NOTIFICATIONS(Android 13+): Service notification
Node capabilities
CAMERA: Photo/video captureRECORD_AUDIO: Audio recording, voice wakeSEND_SMS: SMS features (optional)REQUEST_INSTALL_PACKAGES: APK updates (optional)
Features (optional)
android.hardware.camera: Not required (software fallback)android.hardware.telephony: Not required (software fallback)
- Install app
- Launch and navigate to Settings
- Grant permissions when prompted:
- Notifications (Android 13+)
- Nearby devices (Android 13+) or Location (Android 12-)
- Grant Camera/Microphone on first use of features
Build configuration
Gradle build details (apps/android/app/build.gradle.kts):- Jetpack Compose (UI)
- CameraX (camera.* parity)
- OkHttp (WebSocket)
- dnsjava (unicast DNS-SD)
- Bouncy Castle (crypto)
Troubleshooting
Discovery issues
Symptom: No gateways appear in Discovered Gateways list- Verify Gateway is advertising:
-
Check Android permissions:
- Android 13+: “Nearby devices” permission granted
- Android 12-: “Location” permission granted
-
For Tailnet:
- Verify DNS-SD zone configured
- Check Tailscale split DNS settings
- Use Manual Gateway as fallback
Connection failures
Symptom: App shows “Disconnected” or “Pairing required”- Verify Gateway is reachable:
- Check pairing status:
- Reset pairing:
- In app Settings, tap “Clear pairing token”
- Reconnect and approve new pairing request
Canvas/Camera commands fail
Symptom: Commands returnNODE_BACKGROUND_UNAVAILABLE
- Bring Android app to foreground
- Canvas and Camera require active app
- Open Android Settings → Apps → OpenClaw → Permissions
- Grant Camera and Microphone permissions
- Verify Gateway canvas host configured:
- Test canvas URL in browser:
Foreground service issues
Symptom: Service stops unexpectedly- Check battery optimization:
- Android Settings → Apps → OpenClaw → Battery
- Set to “Unrestricted”
- Verify notification permission granted (Android 13+)
- Check service status in notification shade

