blusalt_liveness_native 0.0.3
blusalt_liveness_native: ^0.0.3 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.+'
...
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']
}
}
}
}
Note on Android: #
If you are getting an error on android which says "Unauthorized" when gradle is downloading or building, generate a new github token that have access to clone, read and write to repo, access github packages. If you don't know which to tick, tick all boxes. Cheers
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 #
- This Plugin will only run on a physical device, iOS Simulator is not supported
- If you get an error while compiling about MediaPlayer or Webkit missing. On xcode, click on
Runner, under
TARGETS, clickRunner, Under General Tab, scroll down toFrameworks, 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