Docs / Licensing

Licensing

Trial and production licences, app ID binding per platform (package names, bundle IDs, web domains), online activation and offline licence files. Licences are signed tokens verified on the device.

How licences work

A Facevity licence is a signed token (JWS, ES256: ECDSA P-256 with SHA-256). The SDK verifies it locally with a public key it ships with (Android java.security, iOS CryptoKit, Web WebCrypto), so no network call is ever made on the frame path. The token states which apps may use it, which features are enabled and when it expires. The same licence format works on every platform.

Licence requests never carry camera images, landmarks or biometrics. Online activation and refresh send only the licence key or token, your app ID, the signing-certificate SHA-256 (Android), a random per-install ID, the SDK version and the platform. This happens at activation, about once a day to refresh, and on deactivation.

Licence types

Trial Production
Issued by The Facevity team, on request The Facevity team, under a licence agreement
Length 1 to 90 days One year by default
Watermark “Facevity Trial” on processed frames (can be turned off on request) None
Installs Device-capped (5 by default) Set per licence (or unlimited)
Bound to Your package names, bundle IDs and web domains The same, optionally with Android signing-certificate pins

Trial to production. When you upgrade, the same key, app IDs and activations carry over; the watermark is removed and a new expiry is set. Installed apps pick it up at their next refresh (within about a day). No new key and no app update are needed.

When a trial ends. Once the token expires, effects stop and “Facevity trial expired” is drawn on frames. The camera keeps running.

App ID binding per platform

A licence lists the app IDs it is valid for. One licence can cover several platforms: list your Android package, your iOS bundle ID and your web domains together.

Platform App ID Matching Extra binding
Android package name (com.example.app) exact optional signing-certificate SHA-256 pins
iOS bundle identifier (com.example.app) exact none (issue iOS licences without certificate pins)
Web the page’s host name or origin exact, or a *. wildcard port, when listed
Flutter, React Native the native package name and bundle ID as Android and iOS as Android and iOS

On Flutter and React Native, Facevity.appId / fv.appId returns the ID in use on the current platform. A licence for another ID reports WRONG_AUDIENCE.

Android signing certificates

A licence can pin signing-certificate SHA-256 fingerprints for a package, as printed by:

apksigner verify --print-certs app-release.apk
# or
keytool -list -v -keystore release.jks -alias <alias>

Debug and development builds

A per-licence option, Allow debug/dev builds (off by default), also accepts <your id>.dev, .debug and .dev.debug, so your debug variants work during development. Those variants are not certificate-pinned. Listing every variant explicitly always works too. Release builds reject development-key licences (WRONG_ENVIRONMENT) unless allowDevLicenses says otherwise.

Web domains

Web licences list web domains. A licence can be web-only, or list domains next to packages and bundle IDs.

Domain entry Pages accepted
example.com, app.example.com exactly that host, any port
*.example.com any subdomain at any depth (a.example.com, a.b.example.com), but not example.com itself
example.com:8443 that host on that port
localhost, localhost:5173, 127.0.0.1, [::1], *.localhost, *.test development hosts, development licences only

Paths, other schemes and broad wildcards such as *.com are rejected. The Web SDK accepts development-key licences only on development hosts. The licence server accepts requests from any origin, so pages on your domains can activate and refresh.

Option 1: online activation

Activate once per install. The token is cached and refreshed in the background about once a day. If the device is offline, the cached token keeps working for the grace period (7 days by default, up to 30).

// Android
val fv = Facevity.initialize(context, FacevityOptions.Builder()
    .licenseServerUrl("https://<licence server from your trial>")
    .offlineGraceDays(7)
    .build())
fv.activateLicense("FV-XXXX-XXXX-XXXX-XXXX") { info -> Log.i("App", "Facevity: ${info.status}") }
// iOS
let o = FacevityOptions()
o.licenseServerUrl = "https://<licence server from your trial>"
let fv = try Facevity.initialize(o)
fv.activateLicense("FV-XXXX-XXXX-XXXX-XXXX") { info in print(info.status.name) }
// Web
const fv = await Facevity.initialize({ licenseServer: 'https://<licence server from your trial>', licenseKey: 'FV-XXXX-XXXX-XXXX-XXXX' });
// Flutter
final fv = await Facevity.initialize(licenseKey: 'FV-XXXX-XXXX-XXXX-XXXX', licenseServerUrl: 'https://<licence server from your trial>');
// React Native
const fv = await Facevity.initialize({ licenseKey: 'FV-XXXX-XXXX-XXXX-XXXX', licenseServerUrl: 'https://<licence server from your trial>' });

Option 2: offline licence file

For apps that cannot reach a licence server, we issue a signed .fvl file for one app ID, valid until the licence’s expiry and not bound to a device. Any edit breaks its signature. Revocation cannot reach air-gapped apps, so offline files are usually issued with shorter expiries.

Platform Loaded automatically from Or load it yourself
Android app/src/main/assets/facevity/license.fvl fv.setLicenseFile(context.assets.open("…"))
iOS facevity-license.fvl in the main bundle fv.setLicenseFile(url:)
Web licenseToken: fvlContents or fv.setLicenseFile(contents)
Flutter androidLicenseAsset / iosLicenseResource initialize(licenseAsset: 'assets/facevity/license.fvl'), setLicenseFile(contents)
React Native androidLicenseAsset / iosLicenseResource initialize({ licenseFile }), setLicenseFile(contents)

Option 3: token from your backend

If your backend fetches the token for your app, pass it in as licenseToken at initialisation or with setLicenseToken(token) at runtime. A token that verifies always replaces the cached one; when your backend mints a fresh token with more features, call setLicenseToken on the running engine and the new features apply at once.

Licence features

Each licence lists the features it enables. A feature that is missing is ignored at render time; the rest keeps working. During unlicensed evaluation (watermarked), segmentation, makeup and accessories are available so you can try them.

Feature Enables
beauty.basic Effects without watermark: skin smoothing, tone, eyes, teeth whitening, the natural lip boost, colour filters and backlight compensation
beauty.reshape Slim face, jaw (V-line) and eye enlarging
beauty.makeup Lipstick shades and finish
ar.props AR accessories, built-in and your own packs
beauty.segmentation Pixel-level skin and hair segmentation for the masks
buffer.path YUV buffer input: Android NV21, NV12 and I420, iOS byte buffers, and the Agora hooks of Flutter and React Native

capabilities() reflects the licence on every platform, so your app can hide controls for features it does not have.

What the SDK checks

All checks run locally, in this order: signature by a trusted key, key environment, issuer, app ID in the allowed list, signing certificate (Android, if pinned), install binding (device-capped licences), validity dates, offline grace. A rollback guard keeps the clock from going backwards.

What happens without a valid licence

Situation Result
Valid trial Effects + “Facevity Trial” watermark
Valid production licence Effects, no watermark
Trial expired Effects stop; “Facevity trial expired” is drawn
No licence / invalid WATERMARK (default): effects + “Facevity · unlicensed”; or PASSTHROUGH: frames unchanged
beauty.reshape not licensed Slim face, jaw and eye warps are ignored
beauty.makeup not licensed Lipstick shades are ignored (the natural lip boost still works)
ar.props not licensed setProp has no visible effect
buffer.path not licensed Buffer frames are watermarked

Suspension and revocation take effect at the app’s next validation (within about a day while online) or when its offline grace ends.

Ready to evaluate? Request a trial licence with your package names, bundle IDs and web domains.

Need help with an integration? Contact the Facevity team. We answer integration questions during trials.