initialize With Attestation
fun initializeWithAttestation(apiKey: String, context: Any? = null, debugLogging: Boolean = false, preload: Set<AIModel> = AIModels.DEFAULT, callback: VT.InitCallback)
Initialize SDK using platform attestation for apps without a backend server.
Uses Play Integrity (Android) or App Attest (iOS) to verify the app is running on a genuine device, then registers with VoxaTrace to get a device token.
Note: This requires the API key to be embedded in the app, which is less secure than proxy-based initialization. Use only when a backend proxy is not available.
// Android
VT.initializeWithAttestation(
apiKey = "sk_live_abc123...",
context = this,
preload = setOf(AIModels.Pitch.REALTIME, AIModels.VAD.SPEECH)
) { success, error ->
if (success) {
// SDK ready to use
} else {
showError("License error: $error")
}
}Content copied to clipboard
Parameters
api Key
Your VoxaTrace API key
context
Android Context (required on Android, ignored on iOS)
debug Logging
Enable debug logging
preload
AI models to download at initialization (default: AIModels.DEFAULT)
callback
Called when initialization completes (on main thread)