License and Setup topic

License and Setup

The plugin bootstrap has two distinct phases:

  1. product license authentication and installation
  2. biometric API credential configuration

PT-BR

O bootstrap tem duas fases separadas: licença do produto e configuração das credenciais da API biométrica.

Language guide

English is the primary language of this page.

PT-BR: os resumos com este rótulo ajudam quem integra o pacote em português do Brasil.

License Phase

Use FlutterSmartfaceLicensePlatform for:

Biometric API Credentials

Use FlutterSmartfaceMobilePlatform.setCredentials to configure:

  • user
  • password
  • clientIdentifier

Then use FlutterSmartfaceMobilePlatform.apiConfigured during application startup to restore the session and saved group keys.

final license = FlutterSmartfaceLicensePlatform.instance;
final mobile = FlutterSmartfaceMobilePlatform.instance;

await license.setLogin('license-user', 'license-password');
await license.install(id: 'product-id');

await mobile.setCredentials(
	user: 'api-user',
	password: 'api-password',
	clientIdentifier: 123,
);

final ready = await mobile.apiConfigured();

Active Device Licenses

For active-device license support, the Android SDK exposes the device identifier and token status through the mobile API:

final deviceId = await mobile.getDeviceId();
final retrieved = await license.retrieveLicense();
final tokenActive = await mobile.checkDeviceTokenStatus();
final licenseType = await license.getLicenseTypeInstalled();

The native Android SDK reports mobile device-active products as MOBILE in the installed license type.

Notes For Integrators

  • licenseLoggedIn() and licenseInstalled() are useful for guarding startup and retry logic.
  • retrieveLicense() can restore a server-side license already associated with the current device.
  • setCredentials() persists values securely for later reuse by apiConfigured().
  • Group keys can also be restored automatically after credentials are reapplied.

PT-BR

Para integradores: use licenseLoggedIn() e licenseInstalled() para proteger o bootstrap, e trate apiConfigured() como o ponto central de restauração de sessão.

Libraries

flutter_smartface_license Overview License and Setup
License, product, and installation APIs for SmartFace Flutter integrations.
flutter_smartface_mobile Overview Integration License and Setup Biometric Flows UI and Camera
Main SmartFace Flutter API for biometric operations.