Upgrade the SDK to version 2.1.7:
implementation 'ai.advance.mobile-sdk.android:liveness-detection:2.1.7'
After syncing gradle, you may encounter import errors. Change the import path of the error classes from ai.advance.liveness.lib
to aai.v2liveness
, as follows:
import ai.advance.liveness.lib.GuardianLivenessDetectionSDK;
->
import aai.v2liveness.GuardianLivenessDetectionSDK;
The IMediaPlayer.isPlayEnable()
method has been removed. Use mLivenessView.isSoundPlayEnable()
as a replacement.
If the LivenessActivity
is located in ai.advance.liveness.activity
, modify the package path for this class. Do not use ai.advance.liveness
as the class path.
If you are relying on the UI library, modify the dependency version as follows (UI library does not need to be upgraded to 2.1.7):
implementation 'ai.advance.mobile-sdk.android:liveness-detection-ui:2.1.6'
Modify the path of the LivenessView node in the XML to aai.v2liveness.LivenessView
Click to download the Demo Project
VirusTotal Detection Link::https://www.virustotal.com/gui/file/44ff50a89bf9d90ab7c16fb079c7a7fe3e36a7870bd957fcd4d35dcc62c5a969