Hybrid Native SDK Configuration
The current version supports Hybrid mode: Liveness Detection (Liveness) and Document Quality Detection (IQA) in the H5 flow can invoke the standalone Native Liveness and IQA SDKs. Both SDK capabilities are included by default and can be optionally excluded.
Android Side
Liveness
Includes the following 2 native modules:
| Module Name | Purpose | Package Size | Default Behavior | Removable |
|---|---|---|---|---|
liveness-detection | Core library | ~0.2MB | Integrated by default | ✅ Falls back to H5 Liveness after removal |
liveness-detection-model | Model files | ~1.7MB | Integrated by default | ✅ Downloaded dynamically at runtime after removal |
IQA
Includes the following 2 native modules:
| Module Name | Purpose | Package Size | Default Behavior | Removable |
|---|---|---|---|---|
global-iqa-lib | Core library | ~0.15MB | Integrated by default | ✅ Falls back to H5 IQA after removal |
global-iqa-model | Model files | ~0.7MB | Integrated by default | ✅ Downloaded dynamically at runtime after removal |
Common Library
Native underlying algorithm library:
| Module Name | Purpose | Package Size | Default Behavior | Removable |
|---|---|---|---|---|
native-all | Underlying algorithm library | ~2.7MB | Integrated by default | ✅ Both Liveness and IQA fall back to H5 versions after removal |
How to Configure
Add exclude rules as needed in flutterProject/android/app/build.gradle to remove the corresponding modules:
configurations.all {
exclude group: 'ai.advance.mobile-sdk.android', module: 'liveness-detection' // Remove Liveness SDK (automatically removes its model as well)
exclude group: 'ai.advance.mobile-sdk.android', module: 'liveness-detection-model' // Remove Liveness built-in model only (downloaded dynamically at runtime)
exclude group: 'ai.advance.mobile-sdk.android', module: 'global-iqa-lib' // Remove IQA SDK (automatically removes its model as well)
exclude group: 'ai.advance.mobile-sdk.android', module: 'global-iqa-model' // Remove IQA built-in model only (downloaded dynamically at runtime)
exclude group: 'ai.advance.mobile-sdk.android', module: 'native-all' // Add this as well when neither Liveness nor IQA is needed (~2.7MB)
}iOS Side
Liveness
Includes the following 2 native modules:
| Module Name | Purpose | Package Size | Default Behavior | Addable |
|---|---|---|---|---|
| AAILivenessSDK | Core library | ~1.1MB | Not integrated by default | ✅ The ability to have a hybrid solution liveness component |
| AAILivenessModel | Model files | ~1.7MB | Not integrated by default | ✅ No need to download at runtime |
IQA
Includes the following 2 native modules:
| Module Name | Purpose | Package Size | Default Behavior | Addable |
|---|---|---|---|---|
| AAIGlobalIQASDK | Core library | ~0.59MB | Not integrated by default | ✅ The ability to have a hybrid solution IQA component |
| AAIGlobalIQAModel | Model files | ~0.7MB | Not integrated by default | ✅ No need to download at runtime |
Common Library
Native underlying algorithm library:
| Module Name | Purpose | Package Size | Default Behavior |
|---|---|---|---|
| other dependency | Underlying algorithm library | ~3.2MB | Integrated by default |
How to Configure
Add the following configuration to the podfile file:
source 'https://github.com/advance-ai-mobile/aai-specs.git'
source 'https://cdn.cocoapods.org/'
pod 'SolutionSDK', '2.0.0', :subspecs => ['Core', 'HybridLiveness', 'HybridIQA']
pod 'AAILivenessSDK', '4.4.0', :subspecs => ['Coexistence']
pod 'AAIGlobalIQASDK', '1.5.3', :subspecs => ['Coexistence']
//If you want to import the model file into your IPA package
pod 'AAILivenessModel', '~> 4.2.0'
pod 'AAIGlobalIQAModel', '1.5.1'Updated about 1 hour ago
Did this page help you?
