Skip to main content

Android with Java

Call the Kotlin Android facade from Java while preserving tenant/device binding and deterministic session cleanup.

SDK 0.1.0-RC5 · Evaluation

Test the sample in three steps · Open SDK workspace

Status: Evaluation · SDK: com.visionscan.sdk:vision-scan-android-sdk:0.1.0-RC5 · Minimum: Android API 26 / JDK 17.

For a first scan without building a camera screen, use the ZIP's standalone sample and the three-step walkthrough . Java and Kotlin use the same SDK, tenant key, native engine and device license.

1. Install and get a workspace key

Download RC5 and copy a device SDK key from your workspace , using a trial or purchased seat. Follow local Maven installation . RC4 lacks the initializer used below. Declare CAMERA and INTERNET permissions and request camera access at runtime.

2. Initialize on a worker

Use the complete clientId.secret key from protected build configuration. The SDK validates it with the backend and returns the resolved tenant and device; the app does not collect login details or device IDs.

import android.content.Context;
import com.visionscan.sdk.VisionScanSdk;
import com.visionscan.sdk.VisionScanSdkConfiguration;
import com.visionscan.sdk.VisionScanSdkInitializationResult;

// Call on your I/O executor, never the Android main thread.
VisionScanSdkInitializationResult initialized = VisionScanSdk.INSTANCE.initialize(
    applicationContext,
    new VisionScanSdkConfiguration(
        BuildConfig.VISION_SCAN_CONTROL_PLANE_ORIGIN,
        BuildConfig.VISION_SCAN_SDK_API_KEY));
String tenantId = initialized.getTenantId();
String deviceId = initialized.getDeviceId();

Kotlin object methods are called through INSTANCE . Kotlin defaults do not automatically create Java overloads. Initialization handles signed-license setup; new integrations do not need a separate initializeLeaseStore / applySignedLicenseJws sequence.

3. Bind a MatrixScan session to CameraX

import com.visionscan.sdk.MatrixScanAR;
import com.visionscan.sdk.ScanMode;
import com.visionscan.sdk.VisionSessionConfig;
import com.visionscan.sdk.camerax.MatrixScanAnalyzer;
import com.visionscan.sdk.camerax.MatrixScanCameraError;
import com.visionscan.sdk.camerax.MatrixScanCameraListener;
import com.visionscan.sdk.camerax.MatrixScanCameraResult;
import java.util.Collections;
import java.util.UUID;

VisionSessionConfig config = new VisionSessionConfig(
    UUID.randomUUID().toString(), tenantId, "MAIN", ScanMode.LIVE_STREAM, true, true);
MatrixScanAR session = VisionScanSdk.INSTANCE.createMatrixScanAR(config, Collections.emptySet());
MatrixScanAnalyzer analyzer = new MatrixScanAnalyzer(session, new MatrixScanCameraListener() {
    @Override public void onResult(MatrixScanCameraResult frame) {
        // Worker callback: frame.getResult().getAccepted() contains newly captured tracks.
        // Each track provides getSymbology() and getPayload() bytes.
        // On UI, mapVisibleTracks(previewView.getOutputTransform()) supplies native boundaries.
    }
    @Override public void onError(MatrixScanCameraError error) {
        // Show one concise camera/access status; keep captured values out of system logs.
    }
});
analysis.setAnalyzer(singleWorkerExecutor, analyzer);

The host supplies analysis , previewView and its executor. Use YUV_420_888 and KEEP_ONLY_LATEST; bind Preview/ImageAnalysis in one UseCaseGroup/ViewPort. The analyzer handles row/pixel stride and closes every ImageProxy. Copy the complete binding and overlay implementation from the bundled sample rather than inventing barcode boundaries. Stop/unbind the camera, close the analyzer and session, then stop its executor.

Confirm a scan and telemetry

Present a real QR/EAN barcode. Read actual native accepted tracks; no-decode frames are normal. Enable Matrix telemetry before creating sessions to see mode, symbology and acceptance counts in the same tenant workspace. The included sample already wires this through Scan with AR + telemetry .

Use troubleshooting for access, camera, dependency or telemetry problems. Android Java is an evaluation integration, not a desktop Java scanner SDK. Server clients use the experimental Cloud Java guide .

Support matrix

Full API contract reference

Public contract reference

These are the callable methods and HTTP operations used by this guide. Inputs, results, lifecycle rules, and denial behavior are part of the versioned customer contract.

Android license lifecycle

The host stores only a verified device-bound lease and never constructs entitlement claims.

VisionScanSdk.initialize(context: Context, configuration: VisionScanSdkConfiguration): VisionScanSdkInitializationResult

method

Validate a workspace-issued device SDK key and initialize the matching tenant/device license without collecting credentials in the app UI.

Inputs for VisionScanSdk.initialize(context: Context, configuration: VisionScanSdkConfiguration): VisionScanSdkInitializationResult
InputTypeRequiredMeaning
contextContextYesApplication context used to create device-bound, no-backup lease storage.
controlPlaneOriginHTTPS originYesTrusted VisionScan control-plane origin; HTTPS only, with no path, query, or fragment.
apiKeydevice SDK API keyYesOne-time workspace-issued device key supplied by the host application's build/configuration code, never typed into an end-user screen.
Result
Tenant and registered device IDs resolved by the backend after database-backed key validation and a verified signed-license refresh.
Lifecycle
Blocking; call on a worker. Run at app initialization and again after key rotation or device reassignment. The backend records Android manufacturer, model, device build, OS version, and API level.
Trust boundary
The tenant and device are derived from authenticated database records, never caller input. The key is sent only over HTTPS, is not logged or stored by the SDK, and should be unique and revocable per device; a client-embedded key can be extracted from the application package.
Failure behavior
  • Invalid, revoked, or unknown key; unentitled seat; rejected device metadata; unavailable control plane; invalid signed license; or tenant/device claim mismatch deny initialization.

VisionScanSdk.initializeLeaseStore(storageDir: File, hostDeviceId: String): Unit

method

Configure device-bound persistence used for offline grace and anti-rollback checks.

Inputs for VisionScanSdk.initializeLeaseStore(storageDir: File, hostDeviceId: String): Unit
InputTypeRequiredMeaning
storageDirFileYesA host-owned no-backup directory; do not use a shared or user-exportable location.
hostDeviceIdStringYesThe stable device identifier activated for the authenticated tenant.
Result
Replaces the process entitlement manager with one backed by the device-bound lease store.
Lifecycle
Call once after authenticated device enrollment and before applying or refreshing a license.
Trust boundary
Store verified leases only; bearer tokens remain in host-owned secure credential storage.
Failure behavior
  • Blank or unstable device identity prevents a durable binding.
  • Unreadable storage causes later lease persistence or offline checks to fail closed.

VisionScanSdk.refreshPaidLicense(controlPlaneOrigin, tenantId, deviceId, bearerToken): LicenseRefreshResult

method

Fetch the fixed license and JWKS routes, verify the compact JWS, persist it, and activate it for the process.

Inputs for VisionScanSdk.refreshPaidLicense(controlPlaneOrigin, tenantId, deviceId, bearerToken): LicenseRefreshResult
InputTypeRequiredMeaning
controlPlaneOriginHTTPS originYesScheme and authority only; paths, queries, fragments, cleartext HTTP, and untrusted redirects are rejected.
tenantIdStringYesThe tenant resolved from the authenticated session.
deviceIdStringYesThe already activated device bound to a reserved seat.
bearerTokenStringYesA short-lived access token kept out of source, resources, intents, and logs.
Result
LicenseRefreshResult with activated=true only after signature and claim verification succeeds.
Lifecycle
Run on an I/O worker at login, foreground, entitlement revision changes, reassignment, and before lease expiry.
Trust boundary
The client cannot select arbitrary license routes or weaken the allowlisted signing algorithms.
Failure behavior
  • Network, HTTP, JWKS, signature, claim, tenant, device, expiry, revision, and persistence failures return activated=false.
  • The method never falls back to caller-created claims.

VisionScanSdk.applySignedLicenseJws(jws, expectedTenantId, expectedDeviceId, nowEpochSeconds): EntitlementEvaluationResult

method

Verify and apply a backend-issued compact JWS already fetched by authenticated host networking.

Inputs for VisionScanSdk.applySignedLicenseJws(jws, expectedTenantId, expectedDeviceId, nowEpochSeconds): EntitlementEvaluationResult
InputTypeRequiredMeaning
jwscompact JWSYesA backend-signed license envelope; never a caller-created claims object.
expectedTenantIdStringYesThe authenticated tenant that must match the signed tenant claim.
expectedDeviceIdStringYesThe activated device that must match the signed device claim.
nowEpochSecondsLongNoCurrent Unix time; callers normally use the default and inject time only in tests.
Result
EntitlementEvaluationResult describing allow/deny state, plan, remediation, and correlation identifier.
Lifecycle
Apply before session creation and refresh when the signed lease approaches expiry or the entitlement revision changes.
Trust boundary
The legacy object-taking applySignedLicense overload is permanently fail-closed.
Failure behavior
  • Unknown key, disallowed algorithm, invalid signature, issuer/audience mismatch, invalid timestamps, wrong tenant/device, rollback revision, revocation, expiry, or offline-grace expiry deny access.

Android session and frame lifecycle

A session is a tenant-scoped, entitlement-gated, AutoCloseable native processing lifecycle.

VisionScanSdk.createSession(config: VisionSessionConfig): VisionSession

method

Create a native scanning session for one tenant, site, and execution mode.

Inputs for VisionScanSdk.createSession(config: VisionSessionConfig): VisionSession
InputTypeRequiredMeaning
config.sessionIdStringYesA non-empty identifier unique to the host workflow.
config.tenantIdStringYesMust match the cryptographically verified active license.
config.siteIdStringYesThe authenticated facility or location scope.
config.scanModeScanModeYesLIVE_STREAM, STILL_IMAGE_BATCH, or HIGH_DENSITY_RESCUE.
Result
A ready VisionSession that owns native resources and must be closed.
Lifecycle
Create after license admission; close on workflow completion, logout, or lifecycle stop.
Trust boundary
Batch and rescue modes require both barcode-intelligence and multi-barcode-dense features.
Failure behavior
  • Invalid identifiers throw IllegalArgumentException.
  • Missing, unverified, wrong-tenant, expired, revoked, or feature-incomplete entitlement throws VisionScanEntitlementDeniedException.
  • A missing native bridge throws VisionScanNativeUnavailableException.

VisionSession.submitFrame(width, height, format, buffer, profile?): Int

method

Compatibility entry point that submits one bounded luminance frame to the native pipeline, optionally with an explicit preprocessing profile.

Inputs for VisionSession.submitFrame(width, height, format, buffer, profile?): Int
InputTypeRequiredMeaning
width / heightIntYesPositive pixel dimensions matching the normalized buffer.
formatIntYesThe SDK-supported image format code; CameraX integrations submit extracted luminance.
bufferByteArrayYesA stride-correct frame. Use YPlaneExtractor for padded CameraX Y planes.
profileStillImageBatchScanProfileNoUse liveSweep for responsive camera work or stillImageDense for licensed rescue/batch input.
Result
A native status code. It is not a barcode count; prefer processFrame for same-frame observations.
Lifecycle
Submit only while the session is open. Live mode may drop stale frames; accepted batch input must not be silently dropped.
Trust boundary
The host must bound decoded image size and must not retain or upload image bytes without policy and consent.
Failure behavior
  • Closed sessions throw IllegalStateException.
  • Invalid dimensions, format, buffer, entitlement, or native state return or throw a deterministic failure.

VisionSession.processFrame(width, height, format, buffer, profile?): VisionFrameProcessResult

method

Process one bounded luminance frame through the SDK-owned native scan pipeline and return the status plus observations from that same accepted frame.

Inputs for VisionSession.processFrame(width, height, format, buffer, profile?): VisionFrameProcessResult
InputTypeRequiredMeaning
width / heightIntYesPositive pixel dimensions matching the normalized buffer.
formatIntYesThe SDK-supported image format code; CameraX integrations submit extracted luminance.
bufferByteArrayYesA stride-correct frame. Use YPlaneExtractor for padded CameraX Y planes.
profileStillImageBatchScanProfileNoUse liveSweep for responsive camera work or stillImageDense for licensed rescue/batch input.
Result
VisionFrameProcessResult(status, observations, tracking), where observations are native-decoded evidence from the same accepted frame and tracking contains native stable tracks, active/distinct/stable counts, duplicate-payload physical track count, dense-selection hints, exact target matches, pick state, and overlay-ready quadrilaterals.
Lifecycle
Use for new live and batch capture integrations. Live mode may drop stale frames by policy; accepted batch input must not be silently dropped.
Trust boundary
The host must bound decoded image size and must not retain or upload image bytes without policy and consent.
Failure behavior
  • Closed sessions throw IllegalStateException.
  • Invalid dimensions, format, buffer, entitlement, or native state return or throw a deterministic failure.

VisionSession.setFindTargets(targets: List<VisionScanTarget>): Unit

method

Install exact decoded-payload targets for SDK-owned find/pick matching.

Inputs for VisionSession.setFindTargets(targets: List<VisionScanTarget>): Unit
InputTypeRequiredMeaning
targetsList<VisionScanTarget>YesZero or more payload labels with required stable observation counts. Empty clears targets.
Result
Targets are applied to the native session tracker; subsequent processFrame results update tracking.targetMatchCount and per-track targetMatched/targetLabel.
Lifecycle
Call after session creation and before or during scanning. Targets are session-local and cleared on close.
Trust boundary
Matching is exact against deterministic decoder payloads; geometry and OCR-only rescue never synthesize a target value.
Failure behavior
  • Closed sessions throw IllegalStateException.
  • A missing native target matcher throws VisionScanNativeUnavailableException.

VisionSession.setTrackPickState(trackId: Long, state: VisionPickState): Boolean

method

Update one native tracked barcode's pick state for MatrixScan Pick-style workflows.

Inputs for VisionSession.setTrackPickState(trackId: Long, state: VisionPickState): Boolean
InputTypeRequiredMeaning
trackIdLongYesA positive native track ID returned in VisionTrackedBarcode.trackId.
stateVisionPickStateYesTO_PICK, PICKED, or IGNORED.
Result
True when the native session updated a known track; false when the track is stale or unknown.
Lifecycle
Call only while the session is open. The state is session-local and returned on subsequent tracking results.
Trust boundary
Pick state is workflow metadata only; receipt commit and quantity authority remain outside the scanner SDK.
Failure behavior
  • Closed sessions throw IllegalStateException.
  • Non-positive track IDs throw IllegalArgumentException.
  • A missing native pick-state bridge throws VisionScanNativeUnavailableException.

Android decoded observation contract

Decoded evidence is read separately from frame admission and remains GTIN-first.

VisionSession.getLatestObservations(): List<BarcodeObservation>

method

Return immutable observations produced by the most recently accepted frame.

Result
Zero or more BarcodeObservation values containing rawPayload, symbology, GTIN, dependent lot/expiry/serial evidence, OCR provenance, and confidence.
Lifecycle
Read after submitFrame succeeds and before the session is closed.
Trust boundary
OCR-only GTIN or serial evidence requires review and must never auto-commit; backend receipt validation remains authoritative.
Failure behavior
  • An empty list is a valid no-decode result.
  • Closed sessions throw IllegalStateException.
  • Malformed native observations fail deterministically instead of producing sample data.

Native MatrixScan sessions

PRXV-0122-S01: one native session owns bounded location/decode, tracks and state. Result schema: contracts/schemas/matrix-scan-result.schema.json; formats: contracts/matrix-scan-capabilities.json.

VisionScanSdk.createMatrixScanBatch(config: VisionSessionConfig, formats: Set<MatrixSymbology> = emptySet()): MatrixScanBatch

method

Accept each stable identity once and suppress repeats.

Inputs for VisionScanSdk.createMatrixScanBatch(config: VisionSessionConfig, formats: Set<MatrixSymbology> = emptySet()): MatrixScanBatch
InputTypeRequiredMeaning
configVisionSessionConfigYesVerified tenant context. Barcode intelligence and dense scan entitlement are rechecked on every operation.
formatsSet<MatrixSymbology>NoOnly declared native capabilities; Codabar/ITF require opt-in.
Result
MatrixScanResult: status, input-pixel geometry, tracks, accepted, count and bounded scheduler diagnostics.
Lifecycle
Off camera/UI threads. Monotonic input timestamps. close() releases session. Capacity is explicit; a new operation requires a new session.
Trust boundary
Signed tenant license required by the public Android facade. Physical scan counts are not pharmacy quantities or backend receipt commits.
Failure behavior
  • Invalid/truncated/oversized frame rejected.
  • Decoder failure, cancellation and capacity reached are explicit.
  • Decode time budget is cooperative between backend calls; it does not interrupt an in-flight decoder.

VisionScanSdk.createMatrixScanAR(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanAR

method

Publish persistent decoder-confirmed quadrilaterals.

Inputs for VisionScanSdk.createMatrixScanAR(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanAR
InputTypeRequiredMeaning
configVisionSessionConfigYesVerified tenant context. Barcode intelligence and dense scan entitlement are rechecked on every operation.
formatsSet<MatrixSymbology>NoOnly declared native capabilities; Codabar/ITF require opt-in.
Result
MatrixScanResult: status, input-pixel geometry, tracks, accepted, count and bounded scheduler diagnostics.
Lifecycle
Off camera/UI threads. Monotonic input timestamps. close() releases session. Capacity is explicit; a new operation requires a new session.
Trust boundary
Signed tenant license required by the public Android facade. Physical scan counts are not pharmacy quantities or backend receipt commits.
Failure behavior
  • Invalid/truncated/oversized frame rejected.
  • Decoder failure, cancellation and capacity reached are explicit.
  • Decode time budget is cooperative between backend calls; it does not interrupt an in-flight decoder.

VisionScanSdk.createMatrixScanCount(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanCount

method

Count stable physical tracks; identical payloads at distinct locations remain separate.

Inputs for VisionScanSdk.createMatrixScanCount(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanCount
InputTypeRequiredMeaning
configVisionSessionConfigYesVerified tenant context. Barcode intelligence and dense scan entitlement are rechecked on every operation.
formatsSet<MatrixSymbology>NoOnly declared native capabilities; Codabar/ITF require opt-in.
Result
MatrixScanResult: status, input-pixel geometry, tracks, accepted, count and bounded scheduler diagnostics.
Lifecycle
Off camera/UI threads. Monotonic input timestamps. close() releases session. Capacity is explicit; a new operation requires a new session.
Trust boundary
Signed tenant license required by the public Android facade. Physical scan counts are not pharmacy quantities or backend receipt commits.
Failure behavior
  • Invalid/truncated/oversized frame rejected.
  • Decoder failure, cancellation and capacity reached are explicit.
  • Decode time budget is cooperative between backend calls; it does not interrupt an in-flight decoder.

VisionScanSdk.createMatrixScanFind(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanFind

method

Find exact byte targets only after stable decode evidence.

Inputs for VisionScanSdk.createMatrixScanFind(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanFind
InputTypeRequiredMeaning
configVisionSessionConfigYesVerified tenant context. Barcode intelligence and dense scan entitlement are rechecked on every operation.
formatsSet<MatrixSymbology>NoOnly declared native capabilities; Codabar/ITF require opt-in.
Result
MatrixScanResult: status, input-pixel geometry, tracks, accepted, count and bounded scheduler diagnostics.
Lifecycle
Off camera/UI threads. Monotonic input timestamps. close() releases session. Capacity is explicit; a new operation requires a new session.
Trust boundary
Signed tenant license required by the public Android facade. Physical scan counts are not pharmacy quantities or backend receipt commits.
Failure behavior
  • Invalid/truncated/oversized frame rejected.
  • Decoder failure, cancellation and capacity reached are explicit.
  • Decode time budget is cooperative between backend calls; it does not interrupt an in-flight decoder.

VisionScanSdk.createMatrixScanPick(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanPick

method

Find targets and retain per-track pick transitions.

Inputs for VisionScanSdk.createMatrixScanPick(config: VisionSessionConfig, formats: Set<MatrixSymbology>): MatrixScanPick
InputTypeRequiredMeaning
configVisionSessionConfigYesVerified tenant context. Barcode intelligence and dense scan entitlement are rechecked on every operation.
formatsSet<MatrixSymbology>NoOnly declared native capabilities; Codabar/ITF require opt-in.
Result
MatrixScanResult: status, input-pixel geometry, tracks, accepted, count and bounded scheduler diagnostics.
Lifecycle
Off camera/UI threads. Monotonic input timestamps. close() releases session. Capacity is explicit; a new operation requires a new session.
Trust boundary
Signed tenant license required by the public Android facade. Physical scan counts are not pharmacy quantities or backend receipt commits.
Failure behavior
  • Invalid/truncated/oversized frame rejected.
  • Decoder failure, cancellation and capacity reached are explicit.
  • Decode time budget is cooperative between backend calls; it does not interrupt an in-flight decoder.

Android native MatrixScan camera integration

PRXV-0122-S04: SDK-owned stride extraction, deterministic frame release and native-quad preview mapping. Host retains permission, camera binding, UI, secure storage and backend commit.

MatrixScanSession.processFrame(luma: ByteArray, width: Int, height: Int, stride: Int = width, timestampNs: Long = System.nanoTime()): MatrixScanResult

method

Submit one full unrotated luminance frame to the native session.

Inputs for MatrixScanSession.processFrame(luma: ByteArray, width: Int, height: Int, stride: Int = width, timestampNs: Long = System.nanoTime()): MatrixScanResult
InputTypeRequiredMeaning
frameByteArray + dimensions + stride + monotonic nanosecondsYesCaller-owned readable luma; fixed dimensions per session; no concurrent mutation. Maximum axis 8192 and 32000000 pixels.
Result
Typed MatrixScanResult with industry-neutral byte payloads and input-pixel quads. visibleTracks excludes lost/unstable tracks and failed-frame boxes.
Lifecycle
Synchronous worker call. Native state is session-owned; close after the operation. Do not feed accepted still/burst inputs through dropping live adapters.
Trust boundary
Verified license checked on every call. Payload is not necessarily UTF-8; counts are not backend receipt quantity.
Failure behavior
  • Invalid frame and decoder/capacity/cancellation statuses are explicit.
  • Incompatible native JSON version, encoding, mode or malformed typed result raises a redacted IllegalStateException.

MatrixScanAnalyzer(session: MatrixScanSession, listener: MatrixScanCameraListener): ImageAnalysis.Analyzer, AutoCloseable

type

Adapt live CameraX ImageProxy input without host pixel copying, tracking or decoder orchestration.

Inputs for MatrixScanAnalyzer(session: MatrixScanSession, listener: MatrixScanCameraListener): ImageAnalysis.Analyzer, AutoCloseable
InputTypeRequiredMeaning
sessionMatrixScanSessionYesBorrowed authorized native session; analyzer never closes it.
listenerMatrixScanCameraListenerYesWorker callbacks onResult(MatrixScanCameraResult) and onError(MatrixScanCameraError). Keep callbacks short; callback exceptions propagate after release.
Result
One typed snapshot per processed frame, no retained camera buffer. Every delivered ImageProxy is closed.
Lifecycle
YUV_420_888, KEEP_ONLY_LATEST, single worker. Concurrent/closed live calls are released without decoding. close stops new work; admitted work still delivers its worker callback/evidence. Host stops/unbinds, closes session on worker, then shuts down executor. Discard stale UI painting only.
Trust boundary
No logging or media persistence. Borrowed session keeps license checks; analyzer adds no Scandit dependency.
Failure behavior
  • INVALID_IMAGE, ENTITLEMENT_DENIED and PROCESSING_FAILED carry no raw exception/payload.
  • Native result statuses remain available in frame.result; no decode is a normal empty result.

MatrixScanCameraResult.mapVisibleTracks(previewTransform: OutputTransform): List<MatrixScanOverlay>

method

Map only current stable native quads to PreviewView pixels through CameraX CoordinateTransform.

Inputs for MatrixScanCameraResult.mapVisibleTracks(previewTransform: OutputTransform): List<MatrixScanOverlay>
InputTypeRequiredMeaning
previewTransformandroidx.camera.view.transform.OutputTransformYesNon-null PreviewView transform from the same ViewPort and camera binding as this frame.
Result
MatrixScanOverlay(track: MatrixTrack, quad: List<MatrixPoint>): original native track and four mapped preview-pixel points; original track.quad unchanged.
Lifecycle
Map/render on UI after preview layout. Discard previous-binding callbacks; do not rotate or crop mapped geometry twice. Raw frame timestamp is frame.timestampNs.
Trust boundary
Transforms do not infer payload, identity, target matching or count.
Failure behavior
  • Invalid/non-invertible/non-finite transform fails; never substitute guessed rectangles.
  • Wrong camera binding/ViewPort is caller misuse; clear overlays and rebind rather than painting stale geometry.

Licensed native MatrixScan usage reporting

PRXV-0132-S04: opt-in, content-free native acceptance/processing deltas to the existing tenant-authenticated ingestion API. Metrics schema: contracts/json/matrix-scan-usage.schema.json. Live staging delivery and analytics projections remain validation/downstream gates.

VisionScanSdk.startMatrixTelemetry(options: MatrixTelemetryOptions, tokenProvider: () -> String): MatrixScanTelemetry

method

Attach SDK-owned usage collection to subsequently created MatrixScan sessions, with independent bounded reporting work.

Inputs for VisionScanSdk.startMatrixTelemetry(options: MatrixTelemetryOptions, tokenProvider: () -> String): MatrixScanTelemetry
InputTypeRequiredMeaning
optionsMatrixTelemetryOptionsYesTrusted HTTPS control-plane origin, actual SDK version, bounded interval/capacity and optional encrypted host storage.
tokenProvider() -> StringYesWorker-only provider of the complete workspace device SDK key used for initialization; the existing enrolled bearer-token path is also supported. Never supply the signed license JWS.
Result
Lifecycle handle with typed status, queued/dropped/rejected counters, flushAsync, close, isStopped and awaitStopped.
Lifecycle
Verified UUID-device license first; reporting before native session creation. Close on logout/switch, then awaitStopped on a cleanup worker before reusing storage or restarting. One reporter/file writer.
Trust boundary
No tenant authority in request body; server checks claims and device licensing. No barcode value, image, quad, track ID, key/token or arbitrary diagnostic text. Opt-in, no redirects; five fixed mode buckets. Telemetry is not a billing or receiving authority.
Failure behavior
  • Invalid origin/version/bounds or missing verified UUID-device license rejects start.
  • Transport failure retains stable IDs; only matching per-event outcomes retire events.
  • Queue saturation delays new counters in fixed buckets; shutdown overflow and terminal rejections expose statistics losses, never receipt loss.
  • Corrupt/foreign encrypted spool stops delivery without overwriting it.