AI Native installation
The SDK is built to be installed by a coding agent such as Claude Code, Cursor or Codex. The agent reads these docs, asks you for what it can't find in your project, wires scanning into your app, and hands you a short test to run on a phone. Give it this prompt:
Add Roomio scanning to this app.
Follow https://sdk-docs.roomio.io/get-started/install-with-ai/index.md
Before you send it, have these ready. The agent will ask for them:
- Your publishable key, from Developers → API keys in the Roomio dashboard. It starts with
roomio_pub_live_. - Where finished scans go: an upload endpoint on your backend, or how your backend hands out upload URLs.
- Where scanning starts: the screen that gets the scan button.
The agent can build your app but can't scan. When it's done, it gives you a two-minute test to run on a phone.
Instructions for the agent
You're adding the Roomio SDK to the user's existing app. Every page of these docs is available as Markdown at <page>/index.md; /llms.txt lists them all. Work through these steps in order.
1. Ask first
In one message, ask the user for anything you can't find in the project: the publishable key, the upload destination, and the screen that should start scanning. Don't invent a key. Keys start with roomio_pub_live_. If the user has no upload endpoint yet, keep its URL as one config value and say so.
2. Install
Work out the platform from the project: iOS (.xcodeproj or Package.swift), Android (com.android.application), React Native (react-native in package.json, no Expo) or Expo (an expo app config). Follow that section of Manual installation exactly. A React Native or Expo app also has to meet the iOS and Android requirements.
- Android is in beta: Roomio doesn't process Android scans yet, and sending one returns
scan.failed. If the app builds for Android, tell the user so when you hand over. - Use the version Manual installation names. Don't take one from a sample or your own memory.
- Put the key and the upload URL in build configuration, never in source:
local.propertiesintoBuildConfigon Android, an.xcconfigintoInfo.pliston iOS,.env.localwithEXPO_PUBLIC_variables on Expo, a git-ignored config module on React Native. - Android hosts the scan view in Compose (
AndroidView) or in an XML layout. Use whichever the app already uses; don't add Compose to a Views app.
3. Build the scanning flow
Follow Quickstart in the tab for the platform, then Export and upload. In React Native and Expo, the React Native reference lists every call and type. If you have access to the samples repository, its scanning screen for your platform is a complete, compiled version of the same flow.
The finished flow:
configureonce at launch.- The scan button shows wherever
isSupportedisn't unsupported, including while it's still checking, and opens at most one session at a time. - The scanning screen shows
RoomioScanViewfull screen and callsstart()straight away. The SDK pauses the scan when the app goes to the background and resumes it on return, so don't callpause()orresume()from lifecycle callbacks. In a native Android app, lock the activity hosting it to portrait: a configuration change recreates the activity and loses the session. React Native and Expo handle this. - On finished:
export(), thenclose(), then queue a background upload of the file, unchanged. On cancelled:close()and go back. - The app shows how the upload went: uploaded, with the
scanId, or failed, with a way to retry. Delete the file only after the backend confirms it.
4. Verify
You can't scan: emulators and simulators can't, and a scan needs a person walking through a space. Build for a device (arm64), then, if a phone is connected:
- Launch the app. Within a few seconds of
configure, the device log (Android:adb logcat | grep Roomio; iOS: Xcode console) must not showpublishable_key_rejected. - Open the scanning screen. The SDK's onboarding shows first; skip it, grant the camera, and wait for the live camera.
- Leave with the scan view's close button. The app should go back to where it was.
Fix anything that fails using Troubleshooting. Warnings printed from inside the SDK's own Gradle module or node_modules are expected.
5. Hand over
Tell the user what you changed and where the key and upload URL are configured. Then give them this test:
- Open the app on a phone, tap the scan button, go through the onboarding.
- Walk slowly through a room or two for about a minute, pointing at the walls and floor.
- Tap Complete scan. The app should show the upload succeeding, with a scan id, and the file should arrive at your backend.
Don't
- Change the exported file in any way.
- Add your own buttons over the scan view's Complete scan and close buttons. Hide your own controls while
isShowingOnboardingorisShowingDialogis true. - Use anything outside the public API (
Roomio,RoomioScanSession,RoomioScanView,RoomioScanState,RoomioBundle,RoomioError,RoomioSupport, the diagnostics types), or work around a build failure withmavenLocal()or copied SDK sources. If something blocks you, stop and tell the user the exact error.