NSDKSession
↳ extends Closeable
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.
Declaration
class NSDKSessionProperties
| Name | Type | Summary |
|---|---|---|
| depthSession | DepthSession | - |
| isAuthorized | Boolean | Indicates whether the ARDK session is authorized with valid tokens. Use this property to check if authentication is complete before making API calls that require authorization. You can poll this property to wait for token refresh to complete. Example usage: kotlin // Wait for authorization before making API calls while (!ardkSession.isAuthorized) { delay(1000) } // Now safe to make authorized API calls |
| mapping | DeviceMappingSession | - |
| mapStore | MappingStorageSession | - |
| meshDownload | MeshDownloaderSession | - |
| meshingSession | MeshingSession | - |
| objectDetection | ObjectDetectionSession | - |
| recordingExporter | RecordingExporter | - |
| scanning | ScanningSession | - |
| semantics | SemanticsSession | - |
| sites | SitesSession | - |
| vps | VPSSession | - |
| vps2 | VPS2Session | - |
| vpsCoverage | VPSCoverageSession | - |
| wps | WPSSession | - |
Functions
| Name | Type | Summary |
|---|---|---|
| close | void | Destroys an NSDK instance and any remaining opened feature sessions and frees associated resources. Call this when you're done using NSDK to ensure proper cleanup of native resources and memory. |
| getAccessAuthInfo | AuthInfo? | Gets access token authentication information. Returns authentication information containing information about the current access token. |
| getRefreshAuthInfo | AuthInfo? | Gets refresh token authentication information. Returns authentication information containing information about the current refresh token. |
| getRequestedDataFormats | Int | Gets the data formats that NSDK requires for processing. This function returns a bitmask indicating which types of input data (camera frames, depth, IMU, etc.) NSDK needs for optimal performance. Use this to configure your data capture pipeline accordingly. |
| getVersion | String | Returns the NSDK version string from the native library. |
| sendFrame | void | - |
| setAccessToken | void | Set the access token at runtime. Invalid/empty tokens are ignored by native. |
| setAgeLevel | void | Sets the age level for the NSDK session. This method sets the age classification for the user |
| setCallbackLogLevel | void | Sets the log level for callback logs. This function filters out logs of less severity than the specified level for the callback logger. |
| setFileLogLevel | void | Sets the log level for file logs. This function filters out logs of less severity than the specified level for the file logger. |
| setRefreshToken | void | Set the refresh token at runtime. Invalid/empty tokens are ignored by native. |
| setStdoutLogLevel | void | Sets the log level for stdout logs. This function filters out logs of less severity than the specified level for the stdout logger. |