VPS2Session
↳ extends SessionBase
A session for VPS2 localization. VPS2 parallels the existing VPS feature, but adds: - [getLatestTransformer] for converting between AR poses and geolocations - [getLatestNetworkRequestRecords] for network diagnostics
Declaration
class VPS2SessionProperties
| Name | Type | Summary |
|---|---|---|
| anchorPollingIntervalMs | Long | - |
| anchorUpdates | Flow<AnchorUpdate> | Flow of anchor updates for all tracked anchors. Anchors are automatically added when created via [trackAnchor] or [createAnchor]. |
| ardkHandle | Long | - |
| transformerPollingIntervalMs | Long | - |
| transformerUpdates | Flow<VPS2Transformer> | Flow of the latest transformer snapshot. This is useful for consumers that want to reactively drive UI or downstream computations without manually polling [getLatestTransformer]. |
Functions
| Name | Type | Summary |
|---|---|---|
| anchorIdToString | String | Convert a VPS2 anchor id (32-byte ASCII hex) to a printable string. |
| configure | void | Configure VPS2. Must be called while stopped. |
| createAnchor | UUID | Create and start tracking an anchor at the specified pose. Returns a 32-byte ASCII uppercase hex identifier encoded as a [UUID] (ByteArray). |
| featureStatus | FeatureStatus | - |
| getAnchorPayload | String? | - |
| getAnchorUpdate | AnchorUpdate | - |
| getGeolocation | VPS2GeolocationData | Convert an AR pose to a geolocation using a transformer snapshot. Returns [VPS2GeolocationData] which includes accuracy information along with the geolocation data. |
| getLatestNetworkRequestRecords | List<VPS2NetworkRequestRecord> | Get diagnostic network request records since the last call. |
| getLatestTransformer | VPS2Transformer | Returns the latest transformer snapshot. If [VPS2Transformer.trackingState] is [VPS2TrackingState.UNAVAILABLE], conversion calls that use this transformer will fail with ArdkInvalidOperationStatusException. |
| getPose | Pose | Convert a geolocation to an AR pose using a transformer snapshot. |
| getTrackedAnchors | Set<UUID> | - |
| onDestroy | void | - |
| onInit | void | - |
| removeAnchor | void | - |
| start | void | - |
| stop | void | - |
| trackAnchor | UUID | Start tracking an anchor specified by a base64 payload. Returns a 32-byte ASCII uppercase hex identifier encoded as a [UUID] (ByteArray). Use [anchorIdToString] to convert it to a printable string. |