Quick start
Installation
Add the Microblink Maven repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
maven { url = uri("https://maven.microblink.com") }
}
}
Then add the SDK to your app's build.gradle.kts:
implementation("com.microblink:microblink-platform:1.7.0")
Integration
Here's an example Kotlin integration.
MicroblinkPlatform.startVerification takes a configuration object, collects the user's consent data, and launches the verification flow.
This example logs the transaction result to Logcat.
MicroblinkPlatform.startVerification(
activity = this,
config = MicroblinkPlatformConfig(
mbpResultListener = object : MicroblinkPlatformResultListener {
override fun onVerificationFinished(mbpResult: MicroblinkPlatformResult) {
Log.d("MBP", "Transaction ID: ${mbpResult.transactionId}")
Log.d("MBP", "Transaction status: ${mbpResult.state}")
}
override fun onVerificationCanceled(cancelState: MicroblinkPlatformCancelState) {
Log.d("MBP", "User canceled: ${cancelState.cancelReason}")
}
},
mbpServiceSettings = MicroblinkPlatformServiceSettings(
workflowId = "ID of the workflow to use",
proxySettings = MicroblinkPlatformProxySettings(
url = "URL of your proxy service"
),
consent = MicroblinkPlatformConsent(
userId = "unique user ID",
isProcessingStoringAllowed = true,
isTrainingAllowed = true,
givenOn = System.currentTimeMillis()
)
)
)
)