The Genius Scan SDK includes a dedicated barcode scanning flow that detects barcodes and QR codes in real-time via the device’s camera. This is designed for continuous, live scanning scenarios like warehouse management, inventory tracking, and ticket validation.
The integration is extremely fast (you should be done in less than one hour), and works across platforms.
The simple demo projects from our demo repository demonstrate how to configure the barcode scanning.
Before implementing barcode scanning, you need to install and configure the SDK.
Once you’ve installed and configured the SDK, implement barcode scanning in just a few lines:
// Start the flow
let readableCodeFlow = GSKReadableCodeFlow(configuration: configuration)
do {
let result = try await readableCodeFlow.resultByStarting(fromViewController: self)
// Process detected codes
for code in result.readableCodes {
print("Detected \(code.type): \(code.value)")
}
} catch {
// Handle cancellation or errors
print("Scanning error: \(error)")
}
// Register for result
val readableCodeLauncher = registerForActivityResult(
ReadableCodeFlow.createContract()
) { result ->
when (result) {
is ReadableCodeFlowResult.Success -> {
// Process detected codes
result.codes.forEach { code ->
Log.d("Scanner", "Detected ${code.type}: ${code.value}")
}
}
is ReadableCodeFlowResult.Cancelled -> {
// User cancelled
}
is ReadableCodeFlowResult.Error -> {
// Handle error
Log.e("Scanner", "Error: ${result.message}")
}
}
}
// Launch the scanner
readableCodeLauncher.launch(configuration)
cordova.plugins.GeniusScan.scanReadableCodesWithConfiguration(
configuration,
function(result) {
// Success - process codes
result.readableCodes.forEach(code => {
console.log(`Detected ${code.type}: ${code.value}`);
});
},
function(error) {
// Handle error
console.error('Scanning failed:', error);
}
);
import GeniusScan from '@thegrizzlylabs/react-native-genius-scan';
try {
const result = await GeniusScan.scanReadableCodesWithConfiguration(configuration);
// Process detected codes
result.readableCodes.forEach(code => {
console.log(`Detected ${code.type}: ${code.value}`);
});
} catch (error) {
console.error('Scanning error:', error);
}
import 'package:flutter_genius_scan/flutter_genius_scan.dart';
try {
final result = await FlutterGeniusScan.scanReadableCodesWithConfiguration(configuration);
for (var code in result['readableCodes']) {
print('Detected ${code['type']}: ${code['value']}');
}
} catch (e) {
print('Scanning failed: $e');
}
For .NET MAUI (and Xamarin), reuse the partial ScanFlowService
bridge from the document scan flow. The shared project calls into platform-specific implementations that invoke the native readable code flow:
var scanFlowService = new ScanFlowService();
scanFlowService.SetLicenseKey("YOUR_LICENSE_KEY");
var configuration = new Dictionary<string, object>
{
["IsBatchModeEnabled"] = true,
["SupportedCodeTypes"] = new[] { "qr", "code128" }
};
var resultJson = await scanFlowService.StartScanningReadableCodes(configuration);
// Parse resultJson (JSON string) to access detected codes.
See the demo for the platform implementations:
Feature | Description | Property | Type | Values |
---|---|---|---|---|
Batch mode | Scan multiple codes in session | isBatchModeEnabled |
Bool | (default: false) |
Supported code types | Barcode formats to detect | supportedCodeTypes |
[GSKReadableCodeType] | .qr, .ean13, .ean8, .upcA, .upcE, .code128, .code93, .code39, .interleaved2of5, .codabar, .dataMatrix, .pdf417, .aztec |
Highlight color | Color for detected code overlay | highlightColor |
UIColor | Any UIColor value |
Menu color | UI menu color | menuColor |
UIColor | Any UIColor value |
Feature | Description | Property | Type | Values |
---|---|---|---|---|
Batch mode | Scan multiple codes in session | isBatchModeEnabled |
Boolean | (default: false) |
Supported code types | Barcode formats to detect | supportedCodeTypes |
Set
|
QR, EAN13, EAN8, UPC_A, UPC_E, CODE128, CODE93, CODE39, INTERLEAVED_2_OF_5, CODABAR, DATA_MATRIX, PDF417, AZTEC |
Highlight color | Color for detected code overlay | highlightColor |
Int (Color) | Any color integer |
Menu color | UI menu color | menuColor |
Int (Color) | Any color integer |
Feature | Description | Property | Type | Values |
---|---|---|---|---|
Batch mode | Scan multiple codes in session | isBatchModeEnabled |
boolean | (default: false) |
Supported code types | Barcode formats to detect | supportedCodeTypes |
array | qr, ean13, ean8, upcA, upcE, code128, code93, code39, interleaved2of5, codabar, dataMatrix, pdf417, aztec |
Highlight color | Color for detected code overlay | highlightColor |
string | Hex color (#00FF00) |
Menu color | UI menu color | menuColor |
string | Hex color (#0000FF) |
Feature | Description | Property | Type | Values |
---|---|---|---|---|
Batch mode | Scan multiple codes in session | isBatchModeEnabled |
boolean | (default: false) |
Supported code types | Barcode formats to detect | supportedCodeTypes |
array | qr, ean13, ean8, upcA, upcE, code128, code93, code39, interleaved2of5, codabar, dataMatrix, pdf417, aztec |
Highlight color | Color for detected code overlay | highlightColor |
string | Hex color (#00FF00) |
Menu color | UI menu color | menuColor |
string | Hex color (#0000FF) |
Feature | Description | Property | Type | Values |
---|---|---|---|---|
Batch mode | Scan multiple codes in session | isBatchModeEnabled |
bool | (default: false) |
Supported code types | Barcode formats to detect | supportedCodeTypes |
List
|
qr, ean13, ean8, upcA, upcE, code128, code93, code39, interleaved2of5, codabar, dataMatrix, pdf417, aztec |
Highlight color | Color for detected code overlay | highlightColor |
String | Hex color (#00FF00) |
Menu color | UI menu color | menuColor |
String | Hex color (#0000FF) |
Feature | Description | Property | Type | Values |
---|---|---|---|---|
Batch mode | Scan multiple codes in session | IsBatchModeEnabled |
bool | (default: false) |
Supported code types | Barcode formats to detect | SupportedCodeTypes |
List
|
qr, ean13, ean8, upcA, upcE, code128, code93, code39, interleaved2of5, codabar, dataMatrix, pdf417, aztec |
Highlight color | Color for detected code overlay | HighlightColor |
Color | Color object |
Menu color | UI menu color | MenuColor |
Color | Color object |
Enable batch mode by setting:
configuration.isBatchModeEnabled = true
The SDK supports a wide range of barcode formats:
1D Barcodes:
2D Codes:
© 2025 The Grizzly Labs. All rights reserved.