blusalt_liveness_native 0.0.1
blusalt_liveness_native: ^0.0.1 copied to clipboard
Liveness SDK for Android and IOS
blusalt_liveness_native #
Liveness SDK for Android and IOS
Get your Liveness credentials from Blusalt
Features #
Facial comparison Face Detection
Usage #
dependencies:
blusalt_liveness_native: ^lastVersion
Example #
startSDK() async {
BlusaltLivenessResultResponse? response =
await _livenessPlugin.startLivenessDetectionOnlySDK(
apiKey: apiKey, appName: appName, clientId: clientId, isDev: isDev);
}
Installation #
Android #
Change the minimum Android sdk version to 24 (or higher) in your /android/build.gradle file.
minSdkVersion 24
Create a [github.properties] file in root of android folder and put below into content. Replace values with your github credentials
USERNAME_GITHUB=SampleUsername
TOKEN_GITHUB=SampleClassicToken
Add below to project level gradle file /android/build.gradle
buildscript {
ext.kotlin_version = '1.9.0'
...
dependencies {
classpath 'com.android.tools.build:gradle:7.3.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
def githubPropertiesFile = rootProject.file("github.properties")
def githubProperties = new Properties()
githubProperties.load(new FileInputStream(githubPropertiesFile))
repositories {
maven {
name "GitHubPackages"
url 'https://maven.pkg.github.com/Blusalt-FS/Liveness-Only-Android-Package'
credentials {
username githubProperties['USERNAME_GITHUB']
password githubProperties['TOKEN_GITHUB']
}
}
}
}
iOS #
Minimum iOS Deployment = 14
Add one row to the ios/Runner/Info.plist:
with the key Privacy - Camera Usage Description and a usage description.
<key>NSCameraUsageDescription</key>
<string>your usage description here</string>
Note on iOS #
If you get an error while compiling about MediaPlayer or Webkit missing.
On xcode, click on Runner, under TARGETS, click Runner, Under General Tab, scroll down
to Frameworks, Libraries and Embedded Contents, Click the + icon, search and add each of
frameworks
AVFoundation.framework, CoreMedia.framework, CoreMotion.framework, MediaPlayer.framework,
SystemConfiguration.framework, WebKit.framework