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
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
- Open this folder in Android Studio.
- 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 |

|

|

|

|
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):
- Copy
libfacesdk/ into your project and place facelivenessdk.aar inside it.
settings.gradle: include ':libfacesdk'
app/build.gradle: implementation project(':libfacesdk'), minSdk 24, abiFilters 'arm64-v8a', 'armeabi-v7a', and packaging { jniLibs { useLegacyPackaging = true } }
- Add
CAMERA permission.
- On a background thread:
FaceLivenessSDK.setActivation(context, "YOUR_LICENSE_KEY") โ 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