Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FacePlugin

🌐 Company Site - Here

πŸ€— Hugging Face - Here

πŸ›Ÿ Help Center - Here

🐳 Docker Hub - Here

FacePlugin Face Liveness Detection SDK β€” Android (Fully On-Premise)

Ready in ~10 minutes (after AAR download): Drop facelivenessdk.aar into libfacesdk/ β†’ Run on a phone Jump: Quick start Β· Get the AAR Β· Run the demo Β· Setup Β· About SDK

Quick start checklist

  • Clone https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android
  • Download facelivenessdk.aar from Google Drive
  • Place it in libfacesdk/ (next to libfacesdk/build.gradle)
  • Open this folder in Android Studio β†’ Run on a physical phone
  • Home status shows Ready β†’ Liveness / Settings / About unlock

Your own app? Skip to Setup on your own app. Full API: doc.faceplugin.com.

Introduction

FacePlugin Face Liveness Detection SDK for Android is a fully on-device anti-spoofing engine for KYC and remote identity verification. It detects printed photos, video replay, 3D masks, and deepfake-style attacks β€” no extra hardware, no cloud.

All processing stays on the phone. No biometric data leaves the device.

This repository is the Android demo app. Runtime is libfacesdk/facelivenessdk.aar (download from Google Drive). No other FacePlugin repository is required.

Main Functionalities

Demo tile What it does
Liveness Live camera anti-spoofing with face box + track / liveness / luminance HUD
Settings Camera lens (front / back), liveness threshold
About FacePlugin Face Liveness SDK β€” on-device anti-spoofing

Product List

Platform Repository
Android (Recognition) FaceRecognition-Android
iOS (Recognition) FaceRecognition-iOS
React Native (Recognition) FaceRecognition-React-Native
Flutter (Recognition) FaceRecognition-Flutter
Ionic Capacitor (Recognition) FaceRecognition-Ionic-Capacitor
Ionic Cordova (Recognition) FaceRecognition-Ionic-Cordova
Windows (Recognition) FaceRecognition-Windows
Linux / Docker (Recognition) FaceRecognition-Docker
Android (Liveness) FaceLivenessDetection-Android (this repo)
iOS (Liveness) FaceLivenessDetection-iOS
Windows (Liveness) FaceLivenessDetection-Windows
Linux / Docker (Liveness) FaceLivenessDetection-Docker

Before you start

Step What you need
1 Android Studio + a real device (emulator is not recommended)
2 facelivenessdk.aar in ./libfacesdk/ β€” see Get the AAR
3 Demo license is already in the repo for com.faceplugin.faceliveness. Request a new key only if you change applicationId β€” see SDK License

System requirements

Item Minimum Recommended
Android API 24 (7.0) API 29 (10) or newer
ABI arm64-v8a, armeabi-v7a arm64-v8a
Camera Front or rear Physical device

Get the AAR (libfacesdk)

libfacesdk/facelivenessdk.aar is empty on GitHub because the binary is too large.

Where to download

FaceLivenessSDK Android (Google Drive)

How to place it

git clone https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android.git
cd FaceLivenessDetection-Android

Download facelivenessdk.aar and put it here:

FaceLivenessDetection-Android/
└── libfacesdk/
    β”œβ”€β”€ build.gradle
    └── facelivenessdk.aar

Run the demo

  1. Open this folder in Android Studio.
  2. Run on a device. The demo already has a valid LICENSE_KEY for com.faceplugin.faceliveness.

Keep applicationId com.faceplugin.faceliveness for the included license.

Screenshots

Home Liveness Settings About

FacePlugin Face Liveness β€” Home with Liveness, Settings, About

FacePlugin Face Liveness β€” live camera anti-spoofing with face box and metrics

FacePlugin Face Liveness β€” Settings for camera lens and liveness threshold

FacePlugin Face Liveness SDK β€” About, on-device anti-spoofing

SDK License

Licenses are offline and bound to your applicationId.

The sample app already includes a valid key for com.faceplugin.faceliveness. You only need a new key if you use a different applicationId.

How to get a license

The code below shows how to use the license:

private const val LICENSE_KEY =
"FP1.RlBMMQMAAQASXDm5eIHSK9jh2g4CAgAA4Wfx57+ogaIXBqvkPNaXYtY0OAWLeJW00hliqCd/9Qn5V3iT6wi6x9Og1bSg9thZ0HMt1qVDI/wzxIM0jIp/7TAufMwxeUnvFr8BqCmoK/aR2iGyvZxiVcCDxdNA3fOIXpeGaNUm5r8JtqZqRQ0SDEUGSex5hYMfOow7ar4ysayr697jrQu0Qpko+UOql7Bg4Ib2l81XRBATCa+SYZ+XRxxgEVhFqJRT8TV/boebIiNF5AvkqAO9vclNI0XIDvbug+G8PlMbYtbbC1Vey/IcInZc3/OyA3zD49gNAejYrotDfNjf42OxaX+oGGKmpB7snlFczVb8lEyn0Eq3rizCEE5vZBDjWyt1wUv4NGjxNxhyNb7aaoHr57OVUCqyMd+bqanS7FIiWe6ZvdF95urryCWxlX4Rmry3W0HMweU/GB2rmikiZPKbOZgLZ1PmJgF1miaW383aBi7JVu4hyj1U1Ne1LUziB/zRIEXkFcovT0Gc7iyRb/j1pl29duxJTMncfLJ+peWUJ+T75r3hO/UIc+NgRkXyw7Y/QtPUN/bk2l0tHly9GNY74eIx+VeS7uIUzSv7RUGfglzu3nxWzYuSIGAyqtoUQJ5qTTodexjfGGwwpjw8vTJYsmUcbQ2xGwgG7qGARpIQn3w/EHoqIfvFgXsjMgCFK6P7uhuKvQk9jGSAkosAMIGIAkIBKwe+14lz/SPRjRets54ZoJtsWFQGVn35YFFqQxfeHe2ICYJkOZFR4uqUQiy0veInBSWKPzg17wXUu73FgNnm1KMCQgEQv9FH5PlggGLdPzfoGWQZ9CTGcrMnuQUFXYgFDD3OjEBOWMVNoUNCmFmt9uo/NXA0qlZ30mmtFmQUVS6YV9bV2w=="

FaceLivenessClient.get(this).activate(LICENSE_KEY) { code ->
sdkReady = code == FaceLivenessSDK.SDK_SUCCESS
runOnUiThread {
if (sdkReady) {
updateStatus(getString(R.string.sdk_ready), R.color.status_ok)
} else {
updateStatus(licenseMessage(code), R.color.status_error)
}
}
}

Please contact us to get a license for your own app.

License capabilities

After activation, FaceLivenessSDK.getLicenseStatus() (and LicenseStatus.current() in the demo kit) reports what the key unlocks:

  • Liveness only / Recognition + Liveness β€” Liveness tile
  • Recognition only β€” liveness stays unavailable on this App
  • Not licensed β€” tile stays locked until you activate

Setup on your own app

Minimal integration (details: doc.faceplugin.com):

  1. Copy libfacesdk/ into your project and place facelivenessdk.aar inside it.
  2. settings.gradle: include ':libfacesdk'
  3. app/build.gradle: implementation project(':libfacesdk'), minSdk 24, abiFilters 'arm64-v8a', 'armeabi-v7a', and packaging { jniLibs { useLegacyPackaging = true } }
  4. Add CAMERA permission.
  5. On a background thread: FaceLivenessSDK.setActivation(context, "FP1.…") β†’ FaceLivenessSDK.init(context) (0 = success).

Optional: copy app/.../kit/ (FaceLivenessClient) for demo-style threading / camera helpers.

Request a license for your applicationId, not the demo’s.

About SDK

Public class: com.faceplugin.facelivenessdk.FaceLivenessSDK. Call once per process on a background thread: setActivation β†’ init. Serialize native calls. Full reference: doc.faceplugin.com.

Code Meaning
0 Success
1 License invalid
2 License expired
3 Not activated
4 Init failed

Contact

faceplugin.com  faceplugin.com

About

Liveness detection SDK Android - iBeta level 2 compliant passive liveness detection engine which can detect printed photos, video replay, 3D masks, and deepfake threats

Topics

Resources

Stars

45 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages