Loading repository data…
Loading repository data…
microblink / repository
Everything you need to add AI-driven ID scanning into your native Android app.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
The BlinkID Android SDK is a comprehensive solution for implementing secure document scanning and extraction. It offers powerful capabilities for extracting data from a wide range of identification documents.
The list of all supported documents and result fields can be found here.
BlinkIdScanActivityYou can find the BlinkID SDK KDoc documentation here.
Detailed documentation can be found on our documentation page.
Transition guide from v7 to v8000 can be found on our migration page.
Quick Start dialog choose Open project.File dialog select BlinkIDSample folder.Yes.BlinkIdScanActivity.The BlinkID library is available on Maven Central repository.
In your project root, add mavenCentral() repository to the repositories list, if not already present:
repositories {
// ... other repositories
mavenCentral()
}
Add BlinkID as a dependency in module level build.gradle(.kts):
dependencies {
implementation("com.microblink:blinkid-ux:8000.0.0")
}
A valid license key is required to initialize the document capture process. You can request a free trial license key, after you register, at Microblink Developer Hub. License is bound to the application ID of your app, so please ensure you enter the correct application ID when asked.
You first need to initialize the SDK and obtain the BlinkIdSdk instance:
val maybeInstance = BlinkIdSdk.initializeSdk(
context,
BlinkIdSdkSettings(
licenseKey = "your_license_key",
)
)
when {
maybeInstance.isSuccess -> {
val sdkInstance = maybeInstance.getOrNull()
// use the SDK instance
}
maybeInstance.isFailure -> {
val exception = maybeInstance.exceptionOrNull()
Log.e(TAG, "Initialization failed", exception)
}
}
BlinkIdSdk.initializeSdk is a suspend function which should be called from a coroutine.
BlinkIdCameraScanningScreen composable to display the scanning UX and obtain results:BlinkIdCameraScanningScreen(
sdkInstance,
uxSettings = BlinkIdUxSettings(),
uiSettings = UiSettings(),
cameraSettings = CameraSettings(),
sessionSettings = BlinkIdSessionSettings(),
onScanningSuccess = { scanningResult ->
// scanningResult is BlinkIdScanningResult
},
onScanningCanceled = {
// user canceled the scanning
},
onFrameProcessResult = null // used for additional debugging, analysis, and advanced workflows; not required for basic scanning and result retrieval
)
After the document scanning session is finished, the SDK returns an object of type BlinkIdScanningResult. The object contains extraction process details, document class info, and extraction results. Results are separated into general results and section results. General results are a combined set from each entry with the individual data points taken from the most reliable data source (Barcode > MRZ > Visual).
Section results are separated by document side and by data source (Barcode, MRZ, Visual). Each of these individual data sources is available if present on the document (and allowed through scanning settings).
BlinkID SDK requires Android API level 24 or newer.
To perform successful scans, the camera preview resolution must be at least 1080p. Note that the camera preview resolution is not the same as the video recording resolution.
BlinkID SDK allows the selection of higher and lower resolutions of camera selected for the scanning process. Additionally, if the device has more than one camera, it is possible to select between CameraLensFacing.LensFacingBack and CameraLensFacing.LensFacingFront. Both settings are accessible through CameraSettings in all implementation methods. Desired aspect ration can also be set through these settings.
NOTE: Most of the front facing cameras on Android devices are lower quality and do not have autofocus. This highly impacts their ability to successfully complete the scan.
BlinkID SDK is distributed with ARMv7 and ARM64 native library binaries.
BlinkID is a native library written in C++ and available for multiple platforms. Because of this, BlinkID cannot work on devices with obscure hardware architectures. We have compiled SDK's native code only for the most popular Android ABIs.
If you are combining BlinkID library with other libraries that contain native code in your application, make sure to match the architectures of all native libraries. For example, if the third-party library has only ARMv7 version, you must use exactly ARMv7 version of BlinkID with that library, but not ARM64. Using different architectures will crash your app at the initialization step because JVM will try to load all its native dependencies in the same preferred architecture and fail with UnsatisfiedLinkError.
To avoid this issue and ensure that only architectures supported by the BlinkID library are packaged in the final application, add the following statement to your android/defaultConfig block inside build.gradle.kts:
android {
...
defaultConfig {
...
ndk {
// Tells Gradle to package the following ABIs into your application
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
}
}
}
If you want to reduce the SDK startup time and network traffic, you have the option to pre-bundle the SDK resources as assets into your application. All required resources are located in libs/resources/assets/microblink/blinkid folder. You can bundle it to your application by including the mentioned folder to application's assets. Copy the mentioned libs/resources/assets/microblink directory to src/main/assets folder of your application module (or appropriate folder for desired app flavor).
Use BlinkIdSdkSettings to set the following options when instantiating the SDK:
BlinkIdSdkSettings(
licenseKey = "license-key",
// define license key licensee (optional)
licensee = "licensee",
// disable or enable resource download
downloadResources = false,
// define path if you are not using a default one
resourceDownloadUrl = "download-path",
// define path if you are not using a default one: "microblink/blinkid"
resourceLocalFolder = "path-within-app-assets",
// set custom timeout on resources download (10 seconds by default)
resourceRequestTimeout = RequestTimeout.DEFAULT,
// set custom proxy URL (needs to be allowed by license)
microblinkProxyUrl = null
)
There are two primary methods for integrating the BlinkID SDK into your Android application: via the BlinkIdCameraScanningScreen composable or the BlinkIdScanActivity activity. Each approach offers distinct advantages and trade-offs. The following guidelines can help determine the most suitable integration method for your use case.
When to use the BlinkIdCameraScanningScreen composable:
When to use the BlinkIdScanActivity activity: