Hi,
that’s how we tried it in our first tests.
New Test.
- Componts, Cam, Decoder, memo, button
- Camera in Decoder -> Set to Cam
- In Button -> Start cam
- In OnDecode, the Memo Inserts.
Complete Code below…
On Android 11.. no OnDecoded is fired.
We tested it today with another Android 9 device.. not OnDecoded is fired
No Error, no Warning.. but also no OnDecoded
Delphi target system: Android 32 Bit, SDK 25.2.5
We'll install and Test it again, on Delphi 10 tomorrow
unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.TMSFNCTypes, FMX.TMSFNCUtils, FMX.TMSFNCGraphics, FMX.TMSFNCGraphicsTypes,
FMX.Memo.Types, FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo, FMX.TMSFNCCustomWEBComponent, FMX.TMSFNCWXBarcodeDecoder,
FMX.TMSFNCCustomControl, FMX.TMSFNCWebBrowser, FMX.TMSFNCCustomWEBControl, FMX.TMSFNCWXCamera, FMX.StdCtrls;
type
TForm1 = class(TForm)
TMSFNCWXCamera1: TTMSFNCWXCamera;
TMSFNCWXBarcodeDecoder1: TTMSFNCWXBarcodeDecoder;
Memo1: TMemo;
Button1: TButton;
procedure TMSFNCWXBarcodeDecoder1Decoded(Sender: TObject; AFound: Boolean; AResult: string);
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
begin
TMSFNCWXCamera1.Start;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
procedure TForm1.TMSFNCWXBarcodeDecoder1Decoded(Sender: TObject; AFound: Boolean; AResult: string);
begin
if not AFound then
Memo1.Lines.Add('Not found')
else
Memo1.Lines.Add('Found: ' + AResult);
end;
end.