Skip to main content

Requirements

  • minSdk 26 (Android 8.0)
  • JDK 17
  • Jetpack Compose in the host app
  • A physical device for capture steps

1. Get access to the packages

Artifacts are published to GitHub Packages. Ask your Legal Talent contact to add your GitHub users to the partner team, then create a classic personal access token with read:packages and repo (read). Store the credentials in ~/.gradle/gradle.properties, never in the project:
GitHub Packages requires authentication even for public packages. On CI, inject gpr.user / gpr.token as Gradle properties from your secrets store.

2. Add the dependency

settings.gradle.kts
app/build.gradle.kts
legaltalent-ui brings in core, forensics and liveness. Use legaltalent-core alone for a headless integration.

3. Permissions and network

The SDK’s manifest already declares CAMERA (and NFC in the NFC module); the SDK requests the runtime permission when a capture step opens. You don’t need to add anything. Keep HTTPS only. Recommended res/xml/network_security_config.xml:

4. Create a session on your backend

Your backend creates the session with its API key and returns only the access_token to the app:
Return data.access_token to the app. See Create Session for every parameter.
Never call POST /kyc/sessions from the app, and never embed the API key in the APK.

5. Present the flow

environment defaults to KYCEnvironment.DEV. Always pass it explicitly: STAGING while you integrate, PRODUCTION when you go live. The token must come from the same environment.
The flow state lives in a ViewModel keyed by the access token, so it survives configuration changes such as rotation.

6. Handle the result

onComplete fires once, after the last step is submitted. Treat it as a UX signal:
  1. Navigate away from the flow and show a “verification in progress” screen.
  2. Wait for your backend to receive kyc.session.processed (or the manual approved / rejected events), or poll GET /kyc/sessions/{id} from your backend.
  3. Update the app from your backend’s state.
Android does not have an onExit callback yet. The applicant leaves the flow with the system back gesture, handled by your navigation. The session stays open until it expires, so presenting the flow again with the same token resumes where they left off.

Headless

Errors are thrown as LegalTalentError; see Reference.