stacker_liew 5 Posted July 23, 2019 I created a qr code scan app using ZXing Delphi (https://github.com/Spelt/ZXing.Delphi) in 10.3.1, it's working fine, but after upgraded to 10.3.2, it's no longer scan qr code anymore, does any one face same problem with me? Share this post Link to post
f.m 8 Posted July 23, 2019 (edited) Hi, I tested the demo at https://github.com/Spelt/ZXing.Delphi/blob/v_3.0/demo/advancedTestApp/main.pas To make it work, I had to apply the following changes // 1) Moved this code from FormCreate to FormActivate {$IFDEF ANDROID} FPermissionCamera := JStringToString(TJManifest_permission.JavaClass.CAMERA); {$ENDIF} PermissionsService.RequestPermissions([FPermissionCamera], AccessCameraPermissionRequestResult, DisplayRationale); // 2) Commented this code in FormCreate, because it is called before the CAMERA permission has been granted. Moved in AccessCameraPermissionRequestResult(). UpdateCaptureSettings(TCameraKind.BackCamera); // 3) Changed AutoFocus to ContinuousAutoFocus. CameraComponent1.FocusMode := TFocusMode.ContinuousAutoFocus; // 4) Modified the SampleBufferReady event: procedure TForm1.CameraComponent1SampleBufferReady(Sender: TObject; const ATime: TMediaTime); begin // TThread.Synchronize(TThread.CurrentThread, SyncBitmap); // ParseBitmap(); TThread.Queue(nil, procedure () begin SyncBitmap(); ParseBitmap(); end); end; Also, changed TBarcodeFormat.Auto to TBarcodeFormat.QR_CODE. Edited July 23, 2019 by f.m Share this post Link to post
flydev 1 Posted July 30, 2019 (edited) Hi, You can have a look at my fork: https://github.com/flydev-fr/ZXing.Delphi.Demo - updated a minute ago. Everything work fine on Rio 10.3.2 Edited July 30, 2019 by flydev update Share this post Link to post
E. Spelt 3 Posted August 21, 2019 Hi There was een update today of the Advanced Scan App. Its is now simplified and handles permissions to the onActivate event. There were more problems with this demo app. You can check the changes in the last week. Please read the updated section of Note for: 'Advanced test demo app'. 1 Share this post Link to post