In my application developed with XE7 for Android / iOS, I have a form for scanning barcodes. Based on the barcode found, my application checks whether it is an acceptable barcode or not. Below are the following tutorials: http://www.fmxexpress.com/qr-code-scanner-source-code-for-delphi-xe5-firemonkey-on-android-and-ios/
I am currently testing Android, and I can integrate scanning and reading barcodes, but the onBarCode event does not fire when a barcode search is returned from the total activity. The same code worked well with previous versions of Rad Studio (XE4, XE5, XE6), but now this is not the case in XE7.
Here are some code snippets:
... begin Scanner := TAndroidBarcodeScanner.Create(true); Scanner.OnBarCode := BarcodeHandler; Scanner.Scan; end; procedure TmScannerForm.BarcodeHandler(Sender: TAndroidBarcodeScanner; BarCode: String); begin text1.Text := Barcode; memo1.PasteFromClipboard; AddBarcode(BarCode, true); end;
AddBarCode - I even used it to check and add a barcode to the list, but I did not include it, because this code is not a problem - it does not even start. Text1.text: = Barcode and memo1.paseFromClipboard were for checking them, they didnโt even shoot. I can confirm that the barcodes are read, because if I click and manually insert, the barcode shows.
Why does this not work on XE7, as it was in previous versions of Rad Studio?
source share