BarCodeReader and AVMetadataObjectTypeDataMatrixCode
Delphi iOS Native Components
Brought to you by:
b_yaghobi
I'm trying to scan Data Matrix barcodes in an app that I'm developing.
I added support for "AVMetadataObjectTypeDataMatrixCode" in DPF.iOS.BarCodeReader, method TDPFQRCodeScanner.CreateUIControl
ObjTypes := TNSMutableArray.Create; ObjTypes.addObject( ( AVMetadataObjectTypeDataMatrixCode as ILocalObject ).GetObjectID ); .. LOutput.setMetadataObjectTypes( ObjTypes ); ...
But with no luck - the demo-project is not able to detect Data Matrix codes.
Do you have any idea why AVMetadataObjectTypeDataMatrixCode is not working?
I'm using iOS 9.0.1 / Delphi Seattle - tried both 64bit and 32bit
Found the problem: I had to add support for the format in the delegate method TCaptureDelegate.captureOutput also.
if metadata.&type.isEqualToString( AVMetadataObjectTypeDataMatrixCode ) then begin
....invoke the component-event DoOnScan with the code
end;
...