Skip to main content
Use a cloud device from your browser while an agent works alongside you. The server reads the stream address with the Mobilerun SDK; the API key never reaches the browser.
Install Node 20.19+ or 22.12+, then create a folder for the app:
Save the server tab you choose and App.tsx from one example below before running its commands. For Python, also save these two Vite files so browser API requests reach FastAPI on port 8000:
vite.config.ts
index.html
Open http://localhost:5173; press Ctrl+C to stop the server. The demo binds to localhost only: before exposing it, authenticate users and authorize access to each device in your backend. Never log or persist stream credentials.

Show a device in your web app

Stream a device into a React page and tap or type directly on its screen. Needs: Node 20.19+ or 22.12+ · a ready Cloud Android device · server-side API key and DEVICE_ID · device minutes · dev server keeps running.
The React component runs in the browser with either server:
App.tsx

Stream your Personal Phone full-screen

Keep your Personal Phone connected through Portal and control it in a browser-sized stream. Needs: Node 20.19+ or 22.12+ · a connected Personal Phone · server-side API key and its DEVICE_ID · Portal and the dev server keep running. Connect your Android device or iPhone, then use its Personal Phone ID from the dashboard. On Android, approve screen sharing when prompted. The stream fills the viewport without stretching the device image; black space may appear around it.
Online availability depends on the device, its network, and Portal remaining connected; it is not guaranteed. iPhone setup may require a connected computer. The navigation bar provides Android system keys; iPhone control and screen sharing depend on its connection mode and permissions.
The React component runs in the browser with either server:
App.tsx
The browser polls for the device’s state every three seconds. When it is not ready, the stream is removed; when it returns to ready, the stream mounts again with current credentials. The example never starts or stops the personal device. Before exposing this beyond localhost, authenticate users and authorize access to the device.

Let an agent work while you watch

Run a task on the same device, watch the agent, and stop it when you want to take over. Needs: Node 20.19+ or 22.12+ · a ready Cloud Android device · server-side API key and DEVICE_ID · device minutes and task credits · dev server keeps running.
The React component runs in the browser with either server:
App.tsx

Give every user their own work device

Open http://localhost:5173/?user=alice to find or create Alice’s device, and stop it on sign-out so its apps and settings are there next time. Needs: Node 20.19+ or 22.12+ · Cloud Android creation access · server-side API key · device minutes · dev server keeps running. This query parameter only simulates sign-in: in a real app, use an authenticated identity, authorize every request, and store a durable user-to-device mapping with concurrency protection. For always-on work devices, see device types.
The React component runs in the browser with either server:
App.tsx

Run it on many devices

Stream as many devices as you need: one tile per device.
Put several ready devices in a browser grid and control each one independently. Needs: Node 20.19+ or 22.12+ · ready Cloud Android devices · server-side API key and comma-separated DEVICE_IDS · device minutes per device · dev server keeps running. Set DEVICE_IDS to your device IDs before starting the server:
The React component runs in the browser with either server:
App.tsx
Build a local React app that streams an authorized Mobilerun device using @mobilerun/react. Keep the API key on the server, return only device-scoped stream credentials with Cache-Control: no-store, and use DeviceStream with NavigationBar. For multiple users, authenticate and authorize every request and maintain a durable user-to-device mapping; never log stream credentials.