You can extract multiple types of structured data in a single scan:
let configuration = GSKScanFlowConfiguration()
// Enable multiple data types
configuration.structuredData = [.receipt, .readableCode, .businessCard]
// Configure readable code types if needed
configuration.structuredDataReadableCodeTypes = [.qr, .ean13]
configuration.multiPage = false
configuration.skipPostProcessingScreen = true
// Start scan flow
self.scanFlow = GSKScanFlow(configuration: configuration)
scanFlow.start(from: viewController, onSuccess: { result in
guard let data = result.scans.first?.structuredDataResult else { return }
// Check what was detected
if let receipt = data.receipt {
// Process receipt data
}
if let codes = data.readableCodes {
// Process barcode data
}
if let card = data.businessCard {
// Process business card data
}
}, failure: { error in
// Handle error
})
val configuration = ScanConfiguration().apply {
// Enable multiple data types
structuredData = EnumSet.of(
StructuredData.RECEIPT,
StructuredData.READABLE_CODE
)
// Configure readable code types if needed
structuredDataReadableCodeTypes = EnumSet.of(
ReadableCode.Type.QR,
ReadableCode.Type.EAN13
)
multiPage = false
}
// Start scan flow
ScanFlow.scanWithConfiguration(activity, configuration)
// Handle result
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
data?.let {
val result = ScanFlow.getScanResultFromActivityResult(data)
val structuredData = result.scans?.first()?.structuredDataResult
// Check what was detected
structuredData?.receipt?.let { receipt ->
// Process receipt data
}
structuredData?.readableCodes?.let { codes ->
// Process barcode data
}
}
}
const configuration = {
// Enable multiple data types
structuredData: ['receipt', 'readableCodes'],
// Configure readable code types if needed
structuredDataReadableCodeTypes: ['qr', 'ean13'],
multiPage: false,
skipPostProcessingScreen: true
};
// Start scan flow
try {
const result = await RNGeniusScan.scanWithConfiguration(configuration);
const structuredData = result.scans?.[0]?.structuredData;
// Check what was detected
if (structuredData?.receipt) {
// Process receipt data
console.log("Receipt merchant:", structuredData.receipt.merchant);
console.log("Receipt amount:", structuredData.receipt.amount);
}
if (structuredData?.readableCodes) {
// Process barcode data
structuredData.readableCodes.forEach(code => {
console.log("Code type:", code.type);
console.log("Code value:", code.value);
});
}
} catch (error) {
// Handle error
console.error("Scan failed:", error);
}
var configuration = {
// Enable multiple data types
'structuredData': ['receipt', 'readableCodes'],
// Configure readable code types if needed
'structuredDataReadableCodeTypes': ['qr', 'ean13'],
'multiPage': false,
'skipPostProcessingScreen': true
};
// Start scan flow
try {
var result = await FlutterGeniusScan.scanWithConfiguration(configuration);
var structuredData = result['scans']?[0]?['structuredData'];
// Check what was detected
if (structuredData != null) {
if (structuredData['receipt'] != null) {
// Process receipt data
var receipt = structuredData['receipt'];
print("Receipt merchant: ${receipt['merchant']}");
print("Receipt amount: ${receipt['amount']}");
}
if (structuredData['readableCodes'] != null) {
// Process barcode data
var codes = structuredData['readableCodes'];
for (var code in codes) {
print("Code type: ${code['type']}");
print("Code value: ${code['value']}");
}
}
}
} catch (error) {
// Handle error
print("Scan failed: $error");
}
var configuration = {
// Enable multiple data types
structuredData: ['receipt', 'readableCodes'],
// Configure readable code types if needed
structuredDataReadableCodeTypes: ['qr', 'ean13'],
multiPage: false,
skipPostProcessingScreen: true
};
// Start scan flow
cordova.plugins.GeniusScan.scanWithConfiguration(configuration,
function(result) {
var structuredData = result.scans?.[0]?.structuredData;
// Check what was detected
if (structuredData) {
if (structuredData.receipt) {
// Process receipt data
console.log("Receipt merchant:", structuredData.receipt.merchant);
console.log("Receipt amount:", structuredData.receipt.amount);
}
if (structuredData.readableCodes) {
// Process barcode data
structuredData.readableCodes.forEach(function(code) {
console.log("Code type:", code.type);
console.log("Code value:", code.value);
});
}
}
},
function(error) {
// Handle error
console.error("Scan failed:", error);
}
);
using GeniusScanSDK.ScanFlow;
var scanFlowService = new ScanFlowService();
var configuration = new Dictionary<string, object>
{
// Enable multiple data types
["structuredData"] = new[] { "receipt", "readableCode" },
// Specify which code types to detect
["structuredDataReadableCodeTypes"] = new[] { "qr", "ean13", "code128", "dataMatrix" },
["multiPage"] = false,
["skipPostProcessingScreen"] = true
};
var result = await scanFlowService.ScanDocument(configuration);
// Check what was detected
var scans = (IList<object>)result["scans"];
var firstScan = (Dictionary<string, object>)scans[0];
if (firstScan.TryGetValue("structuredData", out var structuredDataObj))
{
var structuredData = (Dictionary<string, object>)structuredDataObj;
if (structuredData.TryGetValue("receipt", out var receiptObj))
{
var receipt = (Dictionary<string, object>)receiptObj;
Console.WriteLine($"Receipt merchant: {receipt["merchant"]}");
Console.WriteLine($"Receipt amount: {receipt["amount"]}");
}
if (structuredData.TryGetValue("readableCodes", out var readableCodesObj))
{
var barcodes = (IList<object>)readableCodesObj;
foreach (var barcode in barcodes)
{
var code = (Dictionary<string, object>)barcode;
Console.WriteLine($"Code type: {code["type"]}");
Console.WriteLine($"Code value: {code["value"]}");
}
}
}
Start with a free trial license to test the SDK, or contact us directly for a custom quote tailored to your needs.
© 2025 The Grizzly Labs. All rights reserved.