Overview
The Android app provides mobile access to your SimpleClaw assistant:- Gateway connection - connects to your SimpleClaw Gateway via WiFi or cellular
- Chat interface - modern Compose UI for conversations
- Voice Wake - hands-free voice activation
- Talk Mode - voice conversations with audio responses
- Camera access - photo and video capture
- Screen recording - capture screen content via MediaProjection
- Location services - share device location
- SMS - send and manage text messages
- Canvas - view agent-controlled web content
System Requirements
- Android 12.0 (API 31) or later
- Android Studio (for building from source)
- USB debugging enabled (for development)
Installation
Prerequisites
- Android Studio - Latest stable version
- Android SDK - Installed via Android Studio or standalone
- USB debugging - Enabled on your Android device
Build from Source
From the repository root:Install on Device via USB
- Enable Developer Options on your Android device:
- Go to Settings > About Phone
- Tap Build Number 7 times
- Enable USB Debugging:
- Go to Settings > Developer Options
- Enable USB Debugging
- Connect device via USB
- Accept debugging authorization prompt on device
- Verify connection:
- Install and run:
adb devices shows unauthorized, reconnect USB and accept the trust prompt.
Open in Android Studio
To open the project:- Launch Android Studio
- Select Open
- Navigate to
apps/android - Wait for Gradle sync to complete
- Select your device or emulator
- Click Run (▶)
Features
Gateway Connection
Connect to your SimpleClaw Gateway: Setup Code mode:- Enter setup code from gateway
- Automatic pairing flow
- Encrypted credential storage
- Specify host and port
- TLS on/off toggle
- Fingerprint verification
- Open app Connect tab
- Choose Setup Code or Manual
- Enter connection details
- Approve on gateway:
Chat Interface
Modern Jetpack Compose UI:- Message list with markdown rendering
- Text composer with send button
- Session filters and management
- Thinking indicator
- Error states
Voice Wake & Talk
Voice Wake:- Wake word detection
- Background listening
- Microphone permission required
- Push-to-talk recording
- Audio streaming playback
- Microphone permission required
Camera & Screen
Camera capture:camera.snap- capture photoscamera.clip- record video with optional audio- JPEG size limiting to respect bandwidth
screen.record- capture screen via MediaProjection- User consent required per session
- Foreground service notification shown
CAMERA- for photo/videoRECORD_AUDIO- for video with audio
Location Services
Share device location:- One-time location requests
- Background location updates
- Geofencing support
ACCESS_FINE_LOCATION- precise locationACCESS_COARSE_LOCATION- approximate locationACCESS_BACKGROUND_LOCATION- background updates
SMS Management
Send and manage text messages:sms.send- send SMS to contactssms.list- retrieve message history
SEND_SMS
Canvas
WebView-based canvas for agent content:- Navigate to URLs
- Evaluate JavaScript
- Capture snapshots
- Live reload support when served from gateway
Permissions
The Android app declares these permissions:| Permission | Purpose | Required |
|---|---|---|
| INTERNET | Gateway connection | Yes |
| ACCESS_NETWORK_STATE | Network monitoring | Yes |
| FOREGROUND_SERVICE | Background operation | Yes |
| FOREGROUND_SERVICE_DATA_SYNC | Gateway sync | Yes |
| FOREGROUND_SERVICE_MICROPHONE | Voice recording | Optional |
| FOREGROUND_SERVICE_MEDIA_PROJECTION | Screen recording | Optional |
| POST_NOTIFICATIONS | Android 13+ notifications | Optional |
| NEARBY_WIFI_DEVICES | Discovery (Android 13+) | Optional |
| ACCESS_FINE_LOCATION | Location (Android 12-) | Optional |
| ACCESS_COARSE_LOCATION | Approximate location | Optional |
| ACCESS_BACKGROUND_LOCATION | Background location | Optional |
| CAMERA | Photo/video capture | Optional |
| RECORD_AUDIO | Audio recording | Optional |
| SEND_SMS | SMS sending | Optional |
Discovery
Gateway discovery uses Network Service Discovery (NSD): Android 13+ (API 33+):- Requires
NEARBY_WIFI_DEVICESpermission - No location permission needed
- Requires
ACCESS_FINE_LOCATIONpermission - Location needed for WiFi scanning
USB Tunnel Testing
Test gateway connection without LAN access using ADB reverse tunnel: Terminal A (start gateway):- Host:
127.0.0.1 - Port:
18789 - TLS: off
Hot Reload
The app is native Kotlin with Jetpack Compose: Live Edit:- Edit Compose UI code
- Use Android Studio Live Edit
- Changes apply instantly on physical devices (API 31+)
- For many code/resource changes
- Use Apply Changes (⌃⌘R)
- Faster than full reinstall
- Required for structural changes
- Manifest updates
- Gradle configuration
- Native code changes
- Canvas content served from gateway
__simpleclaw__/canvas/ - Auto-reloads when gateway updates content
Development Status
Completed
- ✅ 4-step onboarding flow
- ✅ Connect tab with Setup Code and Manual modes
- ✅ Encrypted persistence for gateway setup/auth
- ✅ Chat UI restyled with Compose
- ✅ Settings UI restyled and de-duplicated
In Progress
- ⏳ QR code scanning in onboarding
- ⏳ Performance improvements
- ⏳ Streaming support in chat UI
- ⏳ Permission request flows
- ⏳ Push notifications
- ⏳ Security hardening (biometric lock, token handling)
- ⏳ Voice tab full functionality
- ⏳ Screen tab full functionality
- ⏳ End-to-end QA and release hardening
Troubleshooting
Build Errors
If Gradle build fails:- Sync Gradle: File > Sync Project with Gradle Files
- Clean build:
./gradlew clean - Invalidate caches: File > Invalidate Caches > Invalidate and Restart
- Check Android SDK location:
~/Library/Android/sdk(macOS)
ADB Connection Issues
Ifadb devices shows no devices:
- Check USB cable (use data cable, not charge-only)
- Re-enable USB debugging on device
- Try different USB port
- Restart ADB server:
Gateway Connection Fails
If connection to gateway fails:- Verify gateway is running:
simpleclaw gateway status - Check firewall allows port 18789
- Verify both devices on same network (for discovery)
- Try manual connection with IP address
- Check app logs in Android Studio Logcat
Discovery Not Working
If gateway discovery fails:- Grant
NEARBY_WIFI_DEVICES(Android 13+) orACCESS_FINE_LOCATION(Android 12-) - Verify both devices on same WiFi network
- Check router allows mDNS/Bonjour traffic
- Try manual connection instead
Development
Project Structure
Code Style
The project follows Kotlin style guidelines:- See
apps/android/style.mdfor conventions - Use Android Studio auto-formatting
- Run
./gradlew ktlintFormatbefore commits