Skip to main content

Native Android AAR installation

Verify the authenticated Android evaluation archive and install its bundled Maven repository.

Status
Evaluation
Integration
Artifact installation
Distribution
Tenant download grant
Version
0.1.0-RC4
Vision Scan Android SDK package integrated into an app that is ready to scan
The AAR guide starts with the package integration story: add the verified SDK artifact, then ship an app that can scan.

Prerequisites

  • An authenticated VisionScan tenant
  • An active evaluation or paid entitlement
  • A compatible release-channel download grant
  • The archive SHA-256 from the authenticated artifact catalog

1. Add the verified local artifact

Add the verified local artifact
repositories {
    maven { url = uri(rootProject.file("vision-scan-kit/maven")) }
    google()
    mavenCentral()
}

dependencies {
    implementation("com.visionscan.sdk:vision-scan-android-sdk:0.1.0-RC4")
}

Extract the granted archive's maven directory into vision-scan-kit. RC2 is not published to a public Maven registry; the bundled POM resolves the OpenCV wrapper and transitive dependencies.

Installation detail

The AAR is distributed through a tenant-scoped download grant — it is never on public Maven. Verify before you install:

  • Compare the archive SHA-256 with the authenticated artifact catalog before extraction.
  • Reject a revoked release, a version other than 0.1.0-RC4, or a checksum mismatch.
  • Use the bundled Maven repository so the OpenCV wrapper and POM dependencies resolve alongside the SDK.
  • The release AAR includes consumer-rules.pro. Keep the kit notices and open-source attributions with the application distribution.

Activation operations

The authenticated sequence for activating your trial and device, in order. Resolve tenant identity from the authenticated session. Never accept it from an editable route or local setting, and never package a bearer token in resources, logs, or the APK.

Activation operation reference
StepMethodPath
Sign inPOST/api/v1/auth/login
Resolve the current tenantGET/api/v1/tenants/current
Activate the evaluationPOST/api/v1/evaluations/activate
Request the SDK download grantPOST/api/v1/SdkCatalog/sdk-artifact/download-grant
Reserve the device seatPOST/api/v1/Devices/reserve-seat
Activate the devicePOST/api/v1/Devices/activate-device
Refresh its signed licensePOST/api/v1/License/{deviceId}/refresh

2. Keep activation host-owned

Keep activation host-owned
login -> current tenant -> activate trial -> create download grant
reserve device seat -> activate device -> refresh signed license -> applySignedLicenseJws

Artifact access and runtime licensing are separate controls; possessing the AAR does not authorize scanning.

3. Confirm the packaged bridge

Confirm the packaged bridge
check(VisionScanSdk.VERSION == "0.1.0-RC4")
check(VisionScanSdk.isNativeBridgeAvailable()) {
    "VisionScan native bridge is missing from this APK"
}

Run this only after Gradle packaging succeeds on a supported ABI.

Errors and recovery

ConditionResolution
Checksum or signature verification failsDo not install the artifact. Redeem a fresh grant and contact support with non-sensitive release metadata.
Native bridge is unavailableInspect APK ABI contents and packaging exclusions; do not bypass the check.

Production checklist

  • Compare the downloaded archive SHA-256 with the authenticated catalog
  • For a separately approved signed kit verify signatures against an independently trusted public key
  • Check backend compatibility and support window
  • Retain the SBOM and release notes with the deployed build

Scan modes

The three Android evaluation workflows. Mode is set on VisionSessionConfig.scanMode and paired with a frame profile; use a separate appropriately licensed session for dense rescue or batch receiving.

Android evaluation workflows
WorkflowModeProfileEntitlement
Live sweepLIVE_STREAMliveSweep()barcode-intelligence
Tap or focused rescueHIGH_DENSITY_RESCUEstillImageDense(1)multi-barcode-dense
Image batch receivingSTILL_IMAGE_BATCHstillImageDense(expectedCount)multi-barcode-dense

Mode behavior in receiving operations: Scan & Count (live-sweep dedup) · Focused Rescue (tap/focused rescue).

GS1 decode contract

Every decode flows through the same deterministic path: the real native decoder and the deterministic GS1 parser produce the observations, and the host only reads them.

Return type
VisionSession.getLatestObservations(): List<BarcodeObservation> — the immutable observations produced by the most recently accepted frame. An empty list is a valid no-decode result.
Observation fields
rawPayload, symbology, GTIN, dependent lot/expiry/serial evidence, OCR provenance, and confidence. GTIN is the primary identity; lot, expiration, and serial remain GTIN-scoped dependent evidence.
OCR rescue
isOcrRescue marks OCR-derived evidence. OCR-only GTIN or serial evidence requires review and must never auto-commit.
Malformed input
Malformed native observations fail deterministically instead of producing sample data. Native absence, malformed decoder output, entitlement denial, or an undecoded frame never produces a sample GTIN.

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 evaluation kit integrity

Artifact access and runtime authorization are independent controls.

release-manifest.json + release-manifest.sig + SHA256SUMS + SHA256SUMS.sig

artifact

Prove the downloaded AAR and companion files belong to the granted release before Gradle packages them.

Inputs for release-manifest.json + release-manifest.sig + SHA256SUMS + SHA256SUMS.sig
InputTypeRequiredMeaning
release kitsigned archiveYesThe archive redeemed through a tenant-scoped, one-time download grant.
release public keyPEM public keyYesThe trusted public key distributed with the release verification policy.
Result
A verified manifest, checksum list, version, channel, compatibility range, and exact AAR digest.
Lifecycle
Verify before installation and again whenever the artifact bytes or release channel changes.
Trust boundary
A successful download does not authorize scanning; runtime use still requires a backend-signed tenant/device license.
Failure behavior
  • Reject a missing or invalid signature.
  • Reject a checksum mismatch, revoked channel, closed support window, or incompatible backend range.

Android license lifecycle

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

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.

Review the release support matrix before deployment. Support status and contract failure behavior remain authoritative even when an example is copied.