A minimal .NET MAUI sample app that demonstrates how to integrate the Suntech.KazamCaptureAI NuGet package into an Android application.
This project is the reference integration example for Suntech's ZebraAi SDK — it shows the complete usage pattern from initialization to result handling in just a few files.
| Platform | Android 11+ (API 30) |
| Target device | Zebra With AI |
| .NET | .NET 10 (MAUI) |
| IDE | Visual Studio 2022 17.12+ or JetBrains Rider |
The app runs only on Android. The project structure is cross-platform MAUI but the SDK is Android-only.
git clone https://github.com/suntech/ZebraAiTester.git
cd ZebraAiTesterOpen ZebraAiTester.csproj in Visual Studio or Rider.
dotnet restoreThis pulls Suntech.KazamCaptureAI and its two satellite model packages automatically:
Suntech.KazamCaptureAI.ZebraBarcode(~108 MB) — barcode localizer modelSuntech.KazamCaptureAI.ZebraOcr(~197 MB) — text OCR recognizer model
First restore may take a few minutes due to the model sizes.
Open Platforms/Android/Services/ZebraAiServiceAndroid.cs and set the LicenseJwt field:
// Use "DEMO" for demo mode (results are partially masked with asterisks)
private static readonly string LicenseJwt = "DEMO";
// Use a real JWT for production (contact info@suntechonline.it)
// private static readonly string LicenseJwt = "eyJ...";In DEMO mode the app works on any device without a license — scan results are partially replaced with * characters to indicate the demo limitation.
To obtain a production license, send your device serial numbers to info@suntechonline.it:
adb shell getprop ro.serialnoConnect your Zebra device via USB and run:
dotnet build ZebraAiTester.csproj -f net10.0-android36.0 -t:RunZebraAiTester/
├── MainPage.xaml # UI — scan buttons and result display
├── MainPage.xaml.cs # Button handlers and result formatting
├── Platforms/
│ └── Android/
│ └── Services/
│ └── ZebraAiServiceAndroid.cs # SDK wrapper (async/Task API)
└── ZebraAiTester.csproj # Project file with NuGet reference
The entire integration is contained in ZebraAiServiceAndroid.cs — a single static helper class that wraps the Kotlin SDK callback model into a clean C# Task<IList<ZebraAiResult>> API.
The SDK is initialized once when the main page appears:
ZebraAiScanner.Initialize(context, LicenseJwt);A scan is started by calling ZebraAiScanner.Scan() and bridging the Kotlin callback to a TaskCompletionSource:
var results = await ZebraAiServiceAndroid.ScanAsync(
activity,
RecognitionMode.Ocr,
SelectionMode.Automatic);The scanner opens a fullscreen overlay on the device camera. The user points the camera at the target and the SDK returns results automatically (or after user confirmation, depending on the selection mode).
| Mode | Description |
|---|---|
Barcode |
Reads 1D/2D barcodes (Code 128, QR, Data Matrix, PDF417, and 40+ more) |
Ocr |
Reads printed or embossed text using the AI OCR model |
Both |
Reads barcodes and text simultaneously |
| Mode | Description |
|---|---|
Automatic |
Returns the first recognized item immediately |
Accumulate |
Lets the user collect multiple items; confirms with "SEND ALL" |
Manual |
Freezes the frame and lets the user tap the item to send |
The UI exposes a slider (0–100%) to set a minimum OCR confidence threshold. Items below the threshold are discarded before being returned to the app:
cfg.OcrFilter.MinConfidencePercent = 75; // discard results below 75% confidenceSet to 0 to disable filtering and receive all results regardless of confidence.
Each ZebraAiResult exposes:
| Property | Type | Description |
|---|---|---|
Value |
string |
The decoded text or barcode value |
Type |
ResultType |
Barcode or Ocr |
Symbology |
string? |
Barcode symbology (e.g. "Code128") — null for OCR |
Confidence |
float |
Recognition confidence in [0, 1] |
This app consumes the SDK via NuGet. The only reference needed in your .csproj is:
<PackageReference Include="Suntech.KazamCaptureAI" Version="1.0.3" />NuGet automatically resolves the two satellite model packages as transitive dependencies.
For more details on the full API, see the Suntech.KazamCaptureAI README.
This sample project is provided by Suntech Srl for integration reference purposes.
The ZebraAi SDK itself is a commercial product — see the NuGet package license for details.
For support or licensing inquiries: info@suntechonline.it