For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ionic Capacitor

Faceplugin Face Recognition Ionic Capacitor SDK. On-premise face matching and liveness. face-recognition-capacitor plugin for new Ionic apps.

Fully on-premise Face Recognition SDK for Ionic Capacitor. Package: face-recognition-capacitor. Use this for new Ionic apps. Cordova is a different repo.

ionic serve / the browser cannot load the engine. Open Android Studio or Xcode and run on a physical phone.

Code

How to run

1

Install tools

Node 18+, JDK 17, Android Studio and/or Xcode 15+. Physical phone with USB debugging.

2

Clone, install, build the plugin

3

Place native runtimes

Platform
File
Example app path
Your own app path

Android

facerecognitionsdk.aar

example/android/libfacesdk/

node_modules/face-recognition-capacitor/android/libs/

iOS

three frameworks

ios/Frameworks/

node_modules/face-recognition-capacitor/ios/Frameworks/

4

Sync and run

Or npx cap open ios. Wait for the home status bar → Ready.

Keep demo ids so the included license works:

Platform
Id

Android package name

com.faceplugin.facerecognitionsdk

iOS bundle identifier

com.faceplugin.facerecognitionsdk

Demo tiles: Enroll, Identify, Capture, Attribute, Settings, About.

License

Licenses are offline. The sample key is only for the demo app. Request a new license key for your own app. Request a License & Support.

Default thresholds in Settings: identify 0.67, liveness 0.5, pose 40°, eye-close 0.5.

Integrate into your own app

Copy runtimes into node_modules/face-recognition-capacitor/... as in the table above. Set your appId in capacitor.config.ts. Add camera + photo-library permissions.

APIs

Call order: getMachineCode → setActivation → init → detect / VideoWorker → deinit.

Status codes: 0 Success, 1 Invalid license, 2 Expired, 3 Not activated, 4 Init failed.

setActivation: This API is used to activate the SDK

init: This API is used to initialize the SDK

getMachineCode: This API is used to retrieve the machine code

faceDetection: This API is used to detect faces

FaceBox includes geometry (x1,y1,x2,y2), pose, liveness / quality / eyes / occlusion, age / gender / emotion / mask / glasses, landmarks, landmarkCount.

templateExtraction: This API is used to extract face template

similarity: This API is used to calculate similarity between two templates

Also: getLicenseStatus, detect(image, crop?, flags?), extractFeature, quality, cropFace, lastLicenseError.

VideoWorker: This API is used for live 1:N identify

Optional session helpers in the example: IdentifySession, CaptureSession.

Request a License & Support · Contact us

FAQ

Package? face-recognition-capacitor. Prefer Capacitor over Cordova for new Ionic apps.

Offline? Yes after setActivation / init with a license key for your app id.

Last updated