Android Integration
1. Install the SDK
Add the dependency to your app-level build.gradle:
dependencies {
implementation("org.very:sdk:1.0.53")
} 2. Configure your app
Add permissions to AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" /> 3. Enroll a new user
Pass null for userId to register a new user. The SDK opens a consent screen, then guides the user through a palm scan.
import org.very.sdk.VerySDK
import org.very.sdk.VeryConfig
import org.very.sdk.VeryResult
import org.very.sdk.VeryPresentationStyle
// Check device support first
if (!VerySDK.isSupported(context)) {
Log.w("Very", "Device not supported")
return
}
val config = VeryConfig(
sdkKey = "your_sdk_key", // from Developer Portal
userId = null, // null = new enrollment
themeMode = "dark" // "dark" or "light"
)
VerySDK.authenticate(
context = this,
config = config,
presentationStyle = VeryPresentationStyle.FULL_SCREEN
) { result: VeryResult ->
if (result.isSuccess) {
Log.d("Very", "User ID: ${result.userId}")
Log.d("Very", "Signed token: ${result.signedToken}")
} else {
Log.e("Very", "Error: ${result.errorType} — ${result.errorMessage}")
}
} 4. Verify an existing user
Pass the user's ID from a previous enrollment to verify their identity.
val config = VeryConfig(
sdkKey = "your_sdk_key",
userId = "vu-1ed0a927-...", // existing user's ID from previous enrollment
themeMode = "dark"
)
VerySDK.authenticate(
context = this,
config = config,
presentationStyle = VeryPresentationStyle.FULL_SCREEN
) { result: VeryResult ->
if (result.isSuccess) {
Log.d("Very", "Verified user: ${result.userId}")
Log.d("Very", "Signed token: ${result.signedToken}")
} else {
Log.e("Very", "Error: ${result.errorType} — ${result.errorMessage}")
}
} 5. Verify the signed token (backend)
When authentication succeeds, the SDK returns userId and signedToken. Send signedToken to your backend:
POST /api/verify-palm
Content-Type: application/json
{
"signedToken": "eyJhbGciOiJFZERTQSIsImtpZCI6..."
}
Verify the JWT signature with VeryAI's public keys at https://api.very.org/.well-known/jwks.json.
After verification, trust the sub claim as the user's VeryAI ID:
{
"sub": "vu-1ed0a927-a336-45dd-9c73-20092db9ae8d",
"exp": 1761013475,
"iat": 1761009875
} - For enrollment: store the
sub(user ID) - use it for future verifications - For verification: confirm the
submatches the expected user codeis an SDK status string, not an OAuth authorization code
VeryConfig
| Parameter | Type | Description |
|---|---|---|
sdkKey | String | Your SDK API key from the Developer Portal |
userId | String? | null for enrollment, user ID for verification |
language | String? | BCP 47 locale code (e.g. "en", "es", "en-IN", "zh-HK"). Defaults to device language. |
themeMode | String | "dark" (default) or "light" |
VeryResult
| Property | Type | Description |
|---|---|---|
isSuccess | Boolean | true if authentication completed successfully |
code | String | SDK status string, not an OAuth authorization code |
userId | String | The user's app-scoped VeryAI ID |
signedToken | String? | Ed25519-signed JWT for backend verification |
errorType | VeryErrorType? | Typed error code (see Error Handling) |
errorMessage | String? | Human-readable error message |
Presentation styles
FULL_SCREEN— full-screen activity (default)BOTTOM_SHEET— bottom sheet dialog
Important: Native SDK verification uses signedToken and JWKS. It does not use OAuth client_id, client_secret, or code exchange.