Jump to content
CRO_Tomislav

Android app - reading barcodes/QR codes

Recommended Posts

Dear all.

 

I am looking for a way to read barcodes/QR codes with android phones. I search a web, looking on a zlib, TMS component, WinSoft component...

Is it a good way to go with a zlib or should I buy some commercial component for reading a codes? Any suggestion?

Is it some willing to share a simple working example/project of using a ZLib for Android phone?

 

THX in advance

Tom

Share this post


Link to post

I suppose the test app is crashing. But you need the library and it is not so hard to use.

fScanBitmap is a FMX.Graphics.TBitmap

  ScanManager := TScanManager.Create(TBarcodeFormat.Auto, nil);
  try
    ReadResult := ScanManager.Scan(fScanBitmap);
  finally
    ReadResult.Free;
    ScanManager.Free;
  end;

 

  • Like 1

Share this post


Link to post

Just tried with Delphi 10.4.2 the demo project aTestApp and is working very nice on Android 13.

But dpr do need to be a little updated because some folders moved and there are some new library units not included into the project.

Share this post


Link to post

As I am new to FireMonky and Android development, can You send me a modificated project aTestApp.?

It will be a much easier for me to understand it so I can try to make my own...

 

THX in advance

Tomislav

Share this post


Link to post

Attached.

Wanted to try also with Delphi 11.3.1 but something is wrong in my environment because also an empty app do not install (package invalid). No time to dig just now into this.

aTestApp.dpr

 

P.S. But nothing special regarding FMX or Android. Just added "..\" to all files and new units to the project.

Edited by Cristian Peța

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×