The following function will be used to scan our QR code:
GetBarcode(preferFrontCamera:::showFlipCameraButton:::showTorchButton:::torchOn:::saveHistory:
::prompt:::resultDisplayDuration:::formats:::orientation:::disableAnimations:::disableSuccessBeep*/)
QR_CODE ;DATA_MATRIX ;UPC_A ;UPC_E ;EAN_8 ;EAN_13 ;CODE_39 ;CODE_93 ;CODE_128 ;CODA
BAR ;ITF ;RSS14 ;PDF417 ;RSS_EXPANDED ;MSI ;AZTEC
var result, Seperator, Params : string;
Seperator := ':::';
Params := 'false'; //preferFrontCamera : true, // iOS and Android
Params := Params + Seperator + 'true'; //showFlipCameraButton : true, // iOS and Android
Params := Params + Seperator + 'true'; //showTorchButton : true, // iOS and Android
Params := Params + Seperator + 'true' ; //torchOn: true, // Android, launch with the torch switched on (if available)
Params := Params + Seperator + 'true'; //saveHistory: true, // Android, save scan history (default false)
Params := Params + Seperator + 'FM Capture Demo'; //prompt : "Place a barcode inside the scan area", // Android
Params := Params + Seperator + '500'; //resultDisplayDuration: 500,
// Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
Params := Params + Seperator + 'QR_CODE,PDF_417'; //formats : "QR_CODE,PDF_417", //
//default: all but PDF_417 and RSS_EXPANDED
Params := Params + Seperator + 'portrait'; //orientation : "landscape",
// Android only (portrait|landscape), default unset so it rotates with the device
Params := Params + Seperator + 'false'; //disableAnimations : true, // iOS
Params := Params + Seperator + 'false'; //disableSuccessBeep: false // iOS and Android
result := GetBarcode(Params);
ShowMessage('Barcode is : ' + result);
Exit;