Skip to main content

Native Android AAR installation

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

SDK 0.1.0-RC5 · Evaluation

Test the sample in three steps · Open SDK workspace

Status: Evaluation Version: 0.1.0-RC5 Minimum Android: API 26 Distribution: Authenticated tenant download grant

VisionScan RC5 is delivered as an authenticated evaluation package. The coordinate com.visionscan.sdk:vision-scan-android-sdk:0.1.0-RC5 identifies the artifact, but the artifact is not published to a public Maven repository.

Artifact and runtime contracts

Installing the AAR and authorizing a device are separate contracts:

Contract Required input Success result Failure behavior
Release integrity Authenticated download grant and catalog SHA-256 Backend verifies server-only HMAC integrity before serving; customer compares archive digest Stop on missing entitlement, checksum mismatch, revoked channel or incompatible version
Runtime entitlement Backend-signed compact JWS bound to the authenticated tenant and activated device applySignedLicenseJws returns an allowed evaluation Unknown key, bad signature, wrong tenant/device, expiry, revocation, missing feature, rollback, or offline-grace expiry denies scanning

Possession of the AAR never grants scan access. See the Android public API reference for the methods exposed after packaging.

1. Download from your workspace

In the SDK workspace , activate a trial or buy a seat directly, create a device key and choose Download Android SDK for RC5. The portal handles the download grant and integrity check. The full key is shown when generated; copy it into your private build configuration.

For automated artifact clients, the low-level control-plane sequence is:

  1. Sign in and resolve the current tenant.
  2. Activate the evaluation or confirm a paid entitlement.
  3. Read the allowed release channel.
  4. Request a grant for the Android artifact and compatible SDK version.
  5. Redeem the one-time grant through the backend-controlled download route.

Do not place a private artifact URL, bearer token, or redeemed grant in source control.

2. Verify the package before installation

The RC5 downloaded archive contains:

  • maven/com/visionscan/sdk/vision-scan-android-sdk/0.1.0-RC5/ with AAR, POM and sources
  • the version-matched OpenCV wrapper under maven/com/visionscan/sdk/opencv/
  • docs/sdk/ , samples/android-sample/ , sbom.json , dependency lock and notices
  • sample-app/ , a standalone Android project with the current sample UI and local Maven dependency

Compare the whole ZIP SHA-256 with the authenticated artifact catalog before extraction. HMAC secrets remain on the backend; they are not supplied to customers or embedded in the SDK. This archive does not include the older reference APK, synthetic label or Ed25519 evaluation kit. If a separately approved signed kit is provided, additionally verify its manifest/checksum signatures against an independently trusted release public key. Do not trust a key merely because it came inside an archive.

3. Add the local artifact

Prefer the bundled Maven repository so the OpenCV wrapper and transitive dependencies resolve from the POM. Extract the maven directory into a trusted local path and add it alongside Google/Maven Central:

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

dependencies {
    implementation("com.visionscan.sdk:vision-scan-android-sdk:0.1.0-RC5")
    implementation("androidx.camera:camera-core:1.4.1")
    implementation("androidx.camera:camera-camera2:1.4.1")
    implementation("androidx.camera:camera-lifecycle:1.4.1")
}

Keep the SDK consumer rules in the packaged AAR. Do not add broad keep rules or ABI exclusions unless APK inspection shows a specific packaging issue.

If your host copies the AAR to app/libs , it must also provide the wrapper and all POM dependencies explicitly. Copying the SDK AAR alone is not a complete installation.

4. Confirm packaging

For a first test, use the bundled sample-app and the three-step walkthrough . For your own app, confirm the SDK version and native bridge:

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

Next call VisionScanSdk.initialize(context, VisionScanSdkConfiguration(origin, apiKey)) on a worker. It validates the device key and establishes the signed tenant/device license; no manual JWS parsing is needed. The low-level applySignedLicenseJws path remains available for existing bearer integrations.

5. Choose the application guide

Troubleshooting

Symptom Action
Signature or checksum mismatch Do not install. Redeem a fresh grant and report only non-sensitive release metadata.
Gradle cannot resolve the coordinate Expected for RC5. Use the verified local AAR; no public Maven repository is advertised.
Native bridge unavailable Inspect the APK's native libraries and ABI filters. Do not bypass the runtime check.
Initialization denied after successful install Check the complete workspace device key, active trial/paid seat, internet connection and key/device status.

Production gate

RC5 is an evaluation artifact. Production publication additionally requires a published artifact state, valid artifact signatures, tenant download entitlement, backend compatibility, an open support window, and product certification evidence.

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 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.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.