BioTrust.Maui
1.2.2
dotnet add package BioTrust.Maui --version 1.2.2
NuGet\Install-Package BioTrust.Maui -Version 1.2.2
<PackageReference Include="BioTrust.Maui" Version="1.2.2" />
<PackageVersion Include="BioTrust.Maui" Version="1.2.2" />
<PackageReference Include="BioTrust.Maui" />
paket add BioTrust.Maui --version 1.2.2
#r "nuget: BioTrust.Maui, 1.2.2"
#:package BioTrust.Maui@1.2.2
#addin nuget:?package=BioTrust.Maui&version=1.2.2
#tool nuget:?package=BioTrust.Maui&version=1.2.2
BioTrust.Maui
Facial biometrics for .NET MAUI: liveness detection, document verification, FaceMatch identification and continuous access control, with the same API on every platform.
Requirements
| Item | Value |
|---|---|
| .NET | 9.0 or newer |
| Android | minSdk 24 |
| iOS | 15.0, physical device only |
| Mac Catalyst / Windows | validation runs the Web SDK in a WebView |
| Credentials | Client UUID, available in the Dashboard |
Installation
dotnet add package BioTrust.Maui
Register the package in MauiProgram:
builder.UseBioTrust();
Registration is required to use BioTrustCameraView.
Android
Camera permission is declared by the SDK. Internet permission belongs to the application:
<uses-permission android:name="android.permission.INTERNET" />
iOS
<key>NSCameraUsageDescription</key>
<string>The camera is used to verify your identity.</string>
Validation
var config = new ValidationConfig
{
Uuid = "your-uuid",
ApiUrl = "https://api.biotrust.io",
Mode = ValidationMode.LivenessOnly
};
var result = await new BioTrustValidator().ValidateAsync(config);
if (result.Cancelled)
{
// dismissed by the user
}
else if (result.IsSuccess)
{
// result.VivacityConfidence, result.FaceImage
}
else
{
// result.Message
}
ValidateAsync always returns a ValidationResult. Rejections, errors and cancellations do
not throw. An invalid configuration is returned as a failure, with the reason in Message,
before the camera opens.
Modes
ValidationMode |
Behavior | Requires |
|---|---|---|
LivenessOnly |
Liveness detection | — |
LivenessWithDocument |
Liveness detection with document verification | DocumentCpf, DocumentBirthDate |
FaceMatch |
Identification among enrolled people (1:N) | — |
FaceMatchExact |
Verification against one person (1:1) | DocumentNumber |
FaceCapture |
Face capture with liveness detection, no database query (iOS) | — |
The full list of ValidationConfig parameters and ValidationResult fields is in the
documentation.
FaceMatch
var manager = new BioTrustFaceMatchManager(config);
var result = await manager.AddPersonAsync("Maria Silva", "12345678901", DocumentType.Cpf);
if (result.IsSuccess)
{
// result.UniqueId
}
| Method | Behavior |
|---|---|
AddPersonAsync(name, document, documentType) |
Enrolls with face capture and liveness detection |
AddPersonFromImageAsync(image, name, document, documentType) |
Enrolls from a JPEG or PNG image, subject to liveness analysis |
EditPersonAsync(personId, name, document, documentType) |
Updates name and photo |
Queries and deletions live in BioTrustFaceMatchDirectory (ListPersonsAsync,
DeletePersonAsync) and require ApiKey and ApiSecret. In publicly distributed
applications, route these operations through your own backend.
Access control
Terminal mode, for turnstiles, gates and doors. The session runs over a view in the application layout and reports one decision per person.
var session = new BioTrustAccessControl(new AccessControlConfig
{
Uuid = "your-uuid",
ApiUrl = "https://api.biotrust.io",
TerminalLabel = "Main entrance"
});
session.Authorized += person => OpenGate(person.Name);
session.Revoked += () => CloseGate();
await session.StartAsync(cameraView); // BioTrustCameraView declared in XAML
session.PersonPassed(); // when the device reports the passage
After granting access, the session does not grant again until PersonPassed() is called or
the grant window expires. While access is granted, an unmatched face raises Revoked,
controlled by RevokeOnMismatch.
Driving the physical device is the responsibility of the application. Available on Android and iOS.
Errors
No method throws. Invalid configuration, network failures and SDK errors return
IsSuccess = false with a description in Message. Cancellation returns Cancelled = true.
One screen operation at a time: a second call while an SDK screen is presented returns a failure.
License
Proprietary software, licensed for use with the BioTrust services under a commercial
agreement. The full text is available at
docs.biotrust.io/licenca.txt and in the LICENSE file
of this package.
Support: cloud@biotrust.io
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-android35.0 is compatible. net9.0-browser was computed. net9.0-ios was computed. net9.0-ios18.0 is compatible. net9.0-maccatalyst was computed. net9.0-maccatalyst18.0 is compatible. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 is compatible. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net10.0-android36.0
- Square.OkHttp3 (>= 4.12.0.10)
- Xamarin.AndroidX.Camera.Camera2 (>= 1.2.3.3)
- Xamarin.AndroidX.Camera.Core (>= 1.2.3.3)
- Xamarin.AndroidX.Camera.Lifecycle (>= 1.2.3.3)
- Xamarin.AndroidX.Camera.View (>= 1.2.3.3)
- Xamarin.Google.MLKit.FaceDetection (>= 116.1.5.11)
- Xamarin.GooglePlayServices.Location (>= 121.0.1.5)
-
net10.0-ios26.0
- No dependencies.
-
net10.0-maccatalyst26.0
- No dependencies.
-
net9.0
- No dependencies.
-
net9.0-android35.0
- Square.OkHttp3 (>= 4.12.0.10)
- Xamarin.AndroidX.Camera.Camera2 (>= 1.2.3.3)
- Xamarin.AndroidX.Camera.Core (>= 1.2.3.3)
- Xamarin.AndroidX.Camera.Lifecycle (>= 1.2.3.3)
- Xamarin.AndroidX.Camera.View (>= 1.2.3.3)
- Xamarin.Google.MLKit.FaceDetection (>= 116.1.5.11)
- Xamarin.GooglePlayServices.Location (>= 121.0.1.5)
-
net9.0-ios18.0
- No dependencies.
-
net9.0-maccatalyst18.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.