Skip to main content
This document targets v0.0.1. You can check the running version with OneS1ght.SDK_VERSION.
OneS1ght is the single object entry point for the whole app — you never create an instance and call every API on it directly. Asynchronous APIs come in two forms with the same name — a suspend fun for Kotlin, and a form that takes a Callback<T> as its last argument for Java. The tables below use the Kotlin form.

Lifecycle

initialize parameters: The default baseUrl is https://console.ones1ght.com/api/sdk/v1.
initialize doesn’t look up buildings or floors, and doesn’t check device support. Unsupported devices still pass initialization (plans and zones can be read); only starting positioning (begin()) is rejected. Space selection is setFloorMap’s job.

Positioning session — FloorSession

Callbacks

Session callbacks go on the FloorSession instance; the debug log goes on OneS1ght. All callbacks are called on the main thread. Listeners are fun interfaces — use ZoneListener { zone -> … } in Kotlin and lambdas in Java.

ConfigChange — console changes

LogLevel — log levels

Import it with import co.onecheck.ones1ght.android.runtime.LogLevel. Values compare in declaration order, so you can filter with level >= LogLevel.WARN.
Only onTriggers is a server response — if the network drops, zone entries still arrive but triggers don’t.

Space lookup

One method per endpoint, with lists and single items in pairs. All are suspend.

Floor selection

Android doesn’t detect the floor automatically. Without setFloorMap, no coordinates are produced (E3001, WARN).

Profiles

Your member IDs never reach the server — only you keep that mapping.

Data upload

Coordinates are uploaded at 300 points or 60 seconds, whichever comes first. Remaining coordinates are also sent when the app goes to the background and on end().

State

From Java, read these through getters — OneS1ght.isInitialized(), OneS1ght.getDeviceAvailability(), OneS1ght.getGoogleMapKey().

Errors — SdkError

SdkError covers the 5 errors the SDK itself throws. Communication failures arrive as ApiError (co.onecheck.ones1ght.android.network). Both are Exception subclasses, and .code.code gives the error code string.
Positioning runtime (E4001–E4004), space setup (E3001–E3006) and permission (E2003) errors aren’t thrown — they’re only logged. Check them in onDebugLog or the console log analyzer. Full list

Models

Models live in the co.onecheck.ones1ght.android.model package.

Coordinates — live coordinates

Building · Floor

Locator · FloorLocators

Zone

Decision parameters are set per zone in the console under Space management → select a zone → SDK zone detection (how to set it). Android decides zones on the device against the zone shapes received from the console.
If inCount is 0, entry is never confirmed and no zone events fire. New zones registered in the console default to 1; if you have old zones with 0, check them in the console.

Trigger — personalized action

MockPositioningProvider — for testing

It’s in the co.onecheck.ones1ght.android.positioning package. Inject it with session.begin(provider) to exercise the SDK pipeline without UWB. ZoneEventStatus is ENTER · DWELL · EXIT.

Threading

  • Kotlin suspend APIs can be called from any coroutine; the SDK switches threads internally.
  • Call identify, empty, pause and resume on the main thread.
  • Callbacks (onPosition, …) and Java Callback results are delivered on the main thread — it’s safe to update the UI directly.

Constraints to know

UWB positioning on Android is foreground-only. When the app goes to the background, positioning stops and the remaining coordinates are uploaded; it restarts when the app returns. This is a platform constraint the SDK can’t work around.
The coordinate buffer lives in memory. If the app is force-quit, coordinates not yet uploaded are lost (E5006).