Skip to main content
API Reference com.nianticspatial.nsdk.vps2

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 VPS2Session

Properties

NameTypeSummary
anchorPollingIntervalMsLong
-
anchorUpdatesFlow<AnchorUpdate>
Flow of anchor updates for all tracked anchors. Anchors are automatically added when created via [trackAnchor] or [createAnchor].
ardkHandleLong
-
transformerPollingIntervalMsLong
-
transformerUpdatesFlow<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

NameTypeSummary
anchorIdToStringString
Convert a VPS2 anchor id (32-byte ASCII hex) to a printable string.
configurevoid
Configure VPS2. Must be called while stopped.
createAnchorUUID
Create and start tracking an anchor at the specified pose. Returns a 32-byte ASCII uppercase hex identifier encoded as a [UUID] (ByteArray).
featureStatusFeatureStatus
-
getAnchorPayloadString?
-
getAnchorUpdateAnchorUpdate
-
getGeolocationVPS2GeolocationData
Convert an AR pose to a geolocation using a transformer snapshot. Returns [VPS2GeolocationData] which includes accuracy information along with the geolocation data.
getLatestNetworkRequestRecordsList<VPS2NetworkRequestRecord>
Get diagnostic network request records since the last call.
getLatestTransformerVPS2Transformer
Returns the latest transformer snapshot. If [VPS2Transformer.trackingState] is [VPS2TrackingState.UNAVAILABLE], conversion calls that use this transformer will fail with ArdkInvalidOperationStatusException.
getPosePose
Convert a geolocation to an AR pose using a transformer snapshot.
getTrackedAnchorsSet<UUID>
-
onDestroyvoid
-
onInitvoid
-
removeAnchorvoid
-
startvoid
-
stopvoid
-
trackAnchorUUID
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.