Code
value class Code(val raw: String)
The kind of failure. New codes may be added in future releases, so include an else branch when you match on codes.
Constructors
Types
Properties
Functions
Code
constructor(raw: String)
Companion
object Companion
Properties
| Name | Summary |
|---|---|
| CAPTURE_FAILED | val CAPTURE_FAILED: RoomioError.Code The scan failed while recording. |
| CONNECTION_REQUIRED | val CONNECTION_REQUIRED: RoomioError.Code The app hasn't been online since it was installed or updated, so scanning isn't set up yet. |
| DEVICE_NOT_SUPPORTED | val DEVICE_NOT_SUPPORTED: RoomioError.Code This device cannot scan. |
| EXPORT_FAILED | val EXPORT_FAILED: RoomioError.Code The finished scan could not be packaged. |
| INSUFFICIENT_STORAGE | val INSUFFICIENT_STORAGE: RoomioError.Code The device is too low on storage, so the scan didn't start. |
| LOW_BATTERY | val LOW_BATTERY: RoomioError.Code The battery is too low to finish a scan, so it didn't start. |
| NOT_CONFIGURED | val NOT_CONFIGURED: RoomioError.Code Roomio.configure has not been called. |
| NOT_READY | val NOT_READY: RoomioError.Code RoomioScanSession.stop was called in the first few seconds of a scan. |
| PERMISSION_DENIED | val PERMISSION_DENIED: RoomioError.Code The user declined camera access. |
| POWER_SAVING | val POWER_SAVING: RoomioError.Code Battery Saver (Android) or Low Power Mode (iOS) is on, so the scan didn't start. |
| PUBLISHABLE_KEY_REJECTED | val PUBLISHABLE_KEY_REJECTED: RoomioError.Code Roomio didn't accept the key passed to Roomio.configure. |
| SDK_UPDATE_REQUIRED | val SDK_UPDATE_REQUIRED: RoomioError.Code This version of the Roomio SDK is no longer supported, so it can't scan. |
| SESSION_UNAVAILABLE | val SESSION_UNAVAILABLE: RoomioError.Code The camera or AR system could not run. |
CAPTURE_FAILED
val CAPTURE_FAILED: RoomioError.Code
The scan failed while recording.
The scan is lost: close the session and offer a new scan. Include message when reporting the problem.
CONNECTION_REQUIRED
val CONNECTION_REQUIRED: RoomioError.Code
The app hasn't been online since it was installed or updated, so scanning isn't set up yet.
The first scan after an install or update needs a connection; after that, scanning works offline. RoomioError.isRetryable is true: ask the user to connect, then try again.
DEVICE_NOT_SUPPORTED
val DEVICE_NOT_SUPPORTED: RoomioError.Code
This device cannot scan.
There is no fix on this device. Call Roomio.isSupported before offering a scan, and hide the option where it returns RoomioSupport.UNSUPPORTED.
EXPORT_FAILED
val EXPORT_FAILED: RoomioError.Code
The finished scan could not be packaged.
The scan is kept. Call RoomioScanSession.export again. If it keeps failing, the scan cannot be exported; include message and RoomioError.underlying when reporting the problem.
INSUFFICIENT_STORAGE
val INSUFFICIENT_STORAGE: RoomioError.Code
The device is too low on storage, so the scan didn't start.
The severity is Severity.RECOVERABLE. The scan view shows a sheet asking the user to free space, and closing it cancels the session. Running low during a scan doesn't stop the scan.
Ask the user to free some space, then start a scan.
LOW_BATTERY
val LOW_BATTERY: RoomioError.Code
The battery is too low to finish a scan, so it didn't start.
The severity is Severity.RECOVERABLE. The scan view shows a sheet asking the user to charge the device, and closing it cancels the session; start a new scan once it has charged. A battery running low during a scan doesn't stop the scan.
NOT_CONFIGURED
val NOT_CONFIGURED: RoomioError.Code
Roomio.configure has not been called.
Call Roomio.configure with your publishable key at app startup, before any other SDK method.
NOT_READY
val NOT_READY: RoomioError.Code
RoomioScanSession.stop was called in the first few seconds of a scan.
PERMISSION_DENIED
val PERMISSION_DENIED: RoomioError.Code
The user declined camera access.
The SDK asks for camera access when the camera first starts, and does not ask again once the user declines. The severity is Severity.RECOVERABLE: the scan view shows a sheet whose "Open settings" button opens your app's page in Settings, and whose "Cancel" button cancels the session. Once the user allows access and returns to your app, the sheet closes and the scan starts; nothing else is needed.
The SDK can only ask when the activity passed to Roomio.startScan is a ComponentActivity; from any other activity it shows the sheet straight away.
POWER_SAVING
val POWER_SAVING: RoomioError.Code
Battery Saver (Android) or Low Power Mode (iOS) is on, so the scan didn't start.
The severity is Severity.RECOVERABLE. The scan view shows a sheet asking the user to turn it off, and closing it cancels the session; start a new scan once it is off. Turning it on during a scan doesn't stop the scan.
PUBLISHABLE_KEY_REJECTED
val PUBLISHABLE_KEY_REJECTED: RoomioError.Code
Roomio didn't accept the key passed to Roomio.configure.
Copy the publishable key again from the Roomio portal. It starts with roomio_pub_live_.
SDK_UPDATE_REQUIRED
val SDK_UPDATE_REQUIRED: RoomioError.Code
This version of the Roomio SDK is no longer supported, so it can't scan.
Update the SDK in your app to the latest release, and ask your users to update the app.
SESSION_UNAVAILABLE
val SESSION_UNAVAILABLE: RoomioError.Code
The camera or AR system could not run.
Close the session. If RoomioError.isRetryable is true, the cause is usually temporary: another app is using the camera, or Google Play Services for AR was not installed or updated. Ask the user to fix that, then start a new scan. If it is false, treat the device as unable to scan.