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 NamePurposePackage SizeDefault BehaviorRemovable
liveness-detectionCore library~0.2MBIntegrated by default✅ Falls back to H5 Liveness after removal
liveness-detection-modelModel files~1.7MBIntegrated by default✅ Downloaded dynamically at runtime after removal

IQA

Includes the following 2 native modules:

Module NamePurposePackage SizeDefault BehaviorRemovable
global-iqa-libCore library~0.15MBIntegrated by default✅ Falls back to H5 IQA after removal
global-iqa-modelModel files~0.7MBIntegrated by default✅ Downloaded dynamically at runtime after removal

Common Library

Native underlying algorithm library:

Module NamePurposePackage SizeDefault BehaviorRemovable
native-allUnderlying algorithm library~2.7MBIntegrated 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 NamePurposePackage SizeDefault BehaviorAddable
AAILivenessSDKCore library~1.1MBNot integrated by default✅ The ability to have a hybrid solution liveness component
AAILivenessModelModel files~1.7MBNot integrated by default✅ No need to download at runtime

IQA

Includes the following 2 native modules:

Module NamePurposePackage SizeDefault BehaviorAddable
AAIGlobalIQASDKCore library~0.59MBNot integrated by default✅ The ability to have a hybrid solution IQA component
AAIGlobalIQAModelModel files~0.7MBNot integrated by default✅ No need to download at runtime

Common Library

Native underlying algorithm library:

Module NamePurposePackage SizeDefault Behavior
other dependencyUnderlying algorithm library~3.2MBIntegrated 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'

Did this page help you?