Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkey

Tutorial To Read And Write Bar Codes And QR Codes With Delphi XE5 Firemonkey On Android

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE5 Firemonkey Barcode Read Write Tutorial | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSAndrea Magni has a blog post up with a tutorial for reading and writing bar codes and QR codes on Android with Delphi XE5 Firemonkey. There are a number of different blog posts and components around for handling bar codes and QR codes on Android. This tutorial explains how to use the third party application Barcode Scanner (which is free from Google Play) to handle reading and writing the bar codes. This method is similar to using CameraUI (aka the built in camera application on the device) for taking photos and videos. Even if you don’t need bar code scanning functionality the tutorial shows you how to launch an Intent on Android and then wait for the result to come back. The blog post is in Italian but I’ve run it through  Google Translate for you. Here is some sample code from the tutorial which shows how to setup an ApplicationEventHandler which will receive the results from the Intent:
procedures TForm1 . FormCreate (Sender: TObject);
begin
FWaitingForResults: = False ;

if not TPlatformServices . Current . SupportsPlatformService (IFMXClipboardService, IInterfaces (FClipBoardService)) then
raise Exception . Create ( 'Can not get access to clipboard service!' );

if not TPlatformServices . Current . SupportsPlatformService (IFMXApplicationEventService, IInterfaces (FApplicationEventService)) then
raise Exception . Create ( 'Can not get application event service' );
FApplicationEventService . SetApplicationEventHandler (ApplicationEventHandler);
end ;

Head over and check out the full tutorial on reading and writing bar codes and QR codes on Android.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
DelphiDemoFiremonkeyLinuxOSXShowcaseWindows

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging

DelphiFiremonkeyShowcaseUtilityWindows

Unleashing Creativity With Song Writer AI: A Deep Dive

DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply