Skip to main content
API Reference

nsdk


Classes

NameTypeSummary
AsyncResultAsyncResult<out TData, out TError : ErrorCodeProvider>
Represents the final result of a completed asynchronous operation, which can either be a success, a failure, or a timeout. * This is the public-facing result type returned by suspend functions. It intentionally omits an "in-progress" state, guaranteeing that the operation has reached a terminal state.
AwarenessImageParamsAwarenessImageParams
Describes inferred image results.
CameraIntrinsicsCameraIntrinsics
Camera intrinsics. This is a copy of the ARCore CameraIntrinsics class.
CameraIntrinsicsFromARCoreCameraIntrinsicsFromARCore
-
DepthConfigDepthConfig
Configuration parameters for ARDK's Depth System. ## Basic Usage kotlin val config = DepthConfig( framerate = 120 featureMode = AwarenessFeatureMode.SMOOTH, ) ARDK.ConfigureDepth(handle, config)
DeviceMappingConfigDeviceMappingConfig
-
FrameDataFrameData
Container for all frame data sent to ARDK for processing. FrameData encapsulates camera frames, sensor data, and metadata that ARDK uses for tracking, mapping, VPS localization, and other AR features. Create one FrameData instance per camera frame and populate it with available sensor data before calling [NSDKSession.sendFrame]. ## Required Data - [cameraTimestampMs] - Frame timestamp for synchronization - [frameId] - Unique identifier for this frame ## Optional Data - [cameraImagePlanes] - Camera image data (YUV420_888 format) - [cameraPose] - Camera pose in world coordinates - [cameraIntrinsics] - Camera calibration parameters - [location] - GPS location data - [compass] - Compass/magnetometer data - [screenOrientation] - Device orientation - [trackingState] - ARCore tracking state
ImageImage
-
MeshingConfigMeshingConfig
-
NsdkFeatureAlreadyInitializedStatusExceptionNsdkFeatureAlreadyInitializedStatusException
Thrown when a feature is already initialized. Corresponds to [NSDKStatus.FEATURE_ALREADY_INITIALIZED].
NsdkFeatureNotInitializedStatusExceptionNsdkFeatureNotInitializedStatusException
Thrown when a required feature has not been initialized. Corresponds to [NSDKStatus.FEATURE_NOT_INITIALIZED].
NsdkInvalidArgumentStatusExceptionNsdkInvalidArgumentStatusException
Thrown when a native argument has an invalid value. Corresponds to [NSDKStatus.INVALID_ARGUMENT].
NsdkInvalidHandleStatusExceptionNsdkInvalidHandleStatusException
Thrown when a native handle is invalid or has been destroyed. Corresponds to [NSDKStatus.INVALID_NSDK_HANDLE].
NsdkInvalidOperationStatusExceptionNsdkInvalidOperationStatusException
Thrown when a native operation is not valid in the current state. Corresponds to [NSDKStatus.INVALID_OPERATION].
NsdkNullArgumentStatusExceptionNsdkNullArgumentStatusException
Thrown when a required native argument is null. Corresponds to [NSDKStatus.NULL_ARGUMENT].
NSDKResultNSDKResult<out TData, out TError : ErrorCodeProvider>
ResultDeprecated wrapper for NSDK operations that can succeed or fail. NSDKResult is a Kotlin sealed class designed to provide a type-safe abstraction over the return values of low-level C APIs. Instead of directly handling raw integer status codes from the C layer, Kotlin callers receive structured results as either Success or Error.
NSDKSessionNSDKSession
Creates a new NSDK instance with the provided API key. This is the primary entry point for initializing NSDK functionality. You must call this before using any other NSDK features.
NsdkStatusExceptionNsdkStatusException
Base class for all NSDK-specific exceptions originating from the native layer.
NsdkUnknownStatusExceptionNsdkUnknownStatusException
Thrown when an internal, unrecoverable error occurs in the native layer. that is unexpected
ScannerConfigScannerConfig
Configuration parameters for scanning functionality. ScannerConfig allows you to customize scan recording behavior including recording framerate, visualization settings, depth range, and output resolution. Use this class to optimize scanning performance for your specific use case. ## Basic Usage kotlin val config = ScannerConfig( framerate = 30, enableRaycastVisualization = true, enableVoxelVisualization = true ) scanningSession.configure(config)
abstract SessionBaseSessionBase<T : SessionBase<T>>
-
UUIDKeyUUIDKey
-
VPS2ConfigVPS2Config
Configuration structure for the VPS2 session.
VPSConfigVPSConfig
Configuration structure for the VPS session. VPSConfig allows you to customize VPS behavior including localization frequency, quality settings, and advanced features like temporal fusion. Use this class to optimize VPS performance for your specific use case. ### Usage kotlin val config = VPSConfig( enableContinuousLocalization = true, cloudInitialRequestsPerSecond = 2.0f, jpegCompressionQuality = 80 ) vpsSession.configure(config)
WPSConfigWPSConfig
Configuration structure for the WPS session. This class allows you to customize WPS behavior including smoothing and framerate settings. In most cases, the default values provide optimal performance and should not be changed. ### Usage kotlin val config = WPSConfig( enableSmoothing = true, framerate = 120 ) wpsSession.configure(config)

Interfaces

NameTypeSummary
ErrorCodeProviderErrorCodeProvider
-
ErrorFactoryErrorFactory<E : ErrorCodeProvider>
-
NsdkLogCallbackNsdkLogCallback
Functional interface for receiving log messages from NSDK. This callback is invoked by the native NSDK library to send log messages to the Kotlin/Java layer. The callback receives the log level, message, and optional source location information.

Data Classes

NameTypeSummary
AnchorUpdateAnchorUpdate
Contains the latest tracking information for a VPS anchor. AnchorUpdate provides comprehensive information about an anchor's current state, including its pose, tracking quality, and status information. This data is updated as VPS refines its localization. ### Overview Anchor updates are retrieved via getAnchorUpdate(uuid) and provide the most current information about an anchor's position, orientation, and tracking status. The data includes confidence metrics and timestamps for quality assessment. ### Example kotlin val update = vpsSession.getAnchorUpdate(anchorId) println("Anchor ID: $&#123;update.uuid&#125;") println("Pose: $&#123;update.anchorToLocalTrackingTransform&#125;") println("Tracking State: $&#123;update.trackingState&#125;") println("Confidence: $&#123;update.trackingConfidence&#125;") if (update.trackingState == AnchorTrackingState.TRACKED &amp;&amp; update.trackingConfidence &gt; 0.8f) &#123; // Use anchor pose for AR content placement placeARContent(update.anchorToLocalTrackingTransform) &#125;
AreaTargetAreaTarget
-
AuthInfoAuthInfo
Authentication information containing token claims. Contains parsed JWT claims including token string, expiration, user information, and other standard JWT fields.
AwarenessContextAwarenessContext
-
CompassCompass
-
CoverageAreaCoverageArea
-
DepthBufferDepthBuffer
Depth result from ARDK's Depth System after computing disparity.
GeolocationDataGeolocationData
-
LatLngLatLng
Geographic coordinates representing latitude and longitude. LatLng is used throughout ARDK for specifying geographic locations, particularly for VPS coverage queries and area-based operations.
LocalizationTargetLocalizationTarget
-
MapMetadataMapMetadata
-
MeshDataMeshData
-
MeshDownloaderDataMeshDownloaderData
-
MeshingUpdateInfoMeshingUpdateInfo
-
PathConfigPathConfig
Optional path overrides mirroring native ARDK_PathConfig. Null or empty values mean: let native auto-detect paths.
RecordingInfoRecordingInfo
-
ScanSaveInfoScanSaveInfo
Information about a saved scan. This class contains details about a scan that has saved (or attempted to be saved), including its unique identifier, file system path, and ultimate state.
WPSLocationWPSLocation
Contains world positioning data from the WPS (World Positioning System). WPSLocation provides global positioning information that combines GPS/GNSS data with visual positioning for enhanced accuracy and reliability. ### Overview WPS location data includes: - Reference GPS coordinates (latitude, longitude, altitude) - Transformation matrix for coordinate conversions - Status information about positioning quality ### Example kotlin val result = wpsSession.getLatestLocation() when (result) &#123; is ARDKResult.Success -&gt; &#123; val location = result.value println("GPS Coordinates: $&#123;location.referenceLatitudeDegrees&#125;, $&#123;location.referenceLongitudeDegrees&#125;") println("Altitude: $&#123;location.referenceAltitudeMetres&#125; meters") // Use the transformation matrix for coordinate conversions val worldPosition = location.trackingToRelativeEdn placeARContent(worldPosition) &#125; is ARDKResult.Error -&gt; &#123; println("WPS error: $&#123;result.code&#125;") &#125; &#125;

Enums

NameTypeSummary
AgeLevelAgeLevel
Codes describing the age level of the user. This enum represents the age classification for users of the NSDK
AnchorTrackingStateAnchorTrackingState
Represents the current tracking state of a VPS anchor. The tracking state indicates how well the system is able to track an anchor's position and orientation in the current environment. This information is crucial for determining the reliability of anchor pose data. ### Overview Tracking states progress from not tracked to fully tracked, with limited tracking representing an intermediate state where tracking is possible but may be less reliable. ### Example kotlin val update = vpsSession.getAnchorUpdate(anchorId) when (update.trackingState) &#123; AnchorTrackingState.NOT_TRACKED -&gt; println("Anchor is not currently being tracked") AnchorTrackingState.LIMITED -&gt; println("Anchor tracking is limited - pose may be unreliable") AnchorTrackingState.TRACKED -&gt; println("Anchor is fully tracked - pose is reliable") &#125;
AnchorTrackingStateReasonAnchorTrackingStateReason
Provides additional context about why an anchor is in a particular tracking state. When an anchor is not tracked or has limited tracking, this enum provides specific reasons that can help developers understand and respond to tracking issues. ### Overview Tracking state reasons help diagnose why tracking may be failing or limited, enabling applications to provide appropriate user feedback or take corrective actions. ### Example kotlin val update = vpsSession.getAnchorUpdate(anchorId) when (update.trackingStateReason) &#123; AnchorTrackingStateReason.INITIALIZING -&gt; println("Anchor is still initializing - tracking will improve") AnchorTrackingStateReason.PERMISSION_DENIED -&gt; println("Tracking failed due to permission issues") AnchorTrackingStateReason.FATAL_NETWORK_ERROR -&gt; println("Network error preventing tracking") else -&gt; println("Other tracking issue: $&#123;update.trackingStateReason&#125;") &#125;
AwarenessFeatureModeAwarenessFeatureMode
-
AwarenessStatusAwarenessStatus
-
FeatureStatusFeatureStatus
-
ImageTypeImageType
-
InputDataFlagsInputDataFlags
-
LocalizabilityLocalizability
-
MeshDownloaderErrorMeshDownloaderError
-
NetworkErrorNetworkError
Network error codes surfaced by NSDK networking-backed features. Mirrors ARDK_NetworkError.
NetworkRequestStatusNetworkRequestStatus
Network request lifecycle status. Mirrors ARDK_NetworkRequestStatus.
NSDKStatusNSDKStatus
Status codes returned by NSDK operations. NSDKStatus represents the outcome of NSDK API calls, indicating success or various types of failures. These codes help diagnose issues with NSDK integration and usage.
OrientationOrientation
Device orientation when capturing camera frames. Orientation affects how ARDK interprets camera data and poses. Ensure the correct orientation is set in [FrameData.screenOrientation] for accurate tracking and localization.
ScanSaveErrorScanSaveError
Error codes that can be returned when a scan fails to save.
ScanSaveStateScanSaveState
Enumeration of possible scan recording save states. This enum represents the current state of a scan recording operation, indicating whether the scan data has been successfully saved, discarded, or failed.
VpsCoverageErrorVpsCoverageError
-
VpsGraphOperationErrorVpsGraphOperationError
Error codes for VPS graph operations. These errors can occur during VPS operations that query the internal graph structure, such as converting device poses to geolocations. Each error provides specific information about why the operation failed.
WPSErrorWPSError
Represents the current error status of the WPS (World Positioning System) feature. These error codes indicate specific issues that may prevent WPS from providing accurate positioning data. Applications should check for these errors and provide appropriate feedback to users.