Skip navigation
Currently Being Moderated

Barcode Reading Using Flex

Oct 20, 2009 3:59 AM



We are developing a Web Application and we are also thinking of using Flex as a UI. In this the client of this application will be using Barcode Scanner to scan the product.


So we want to know that is it possible for Flex to interact with the local(client side) hardware(Specifically Barcode Scanner) as it does with the Web Camera?


What we are assuming is basically Flex UI is a Flash object and being a Flash object it must have access to hardware present on local machine.Please correct me if I am wrong.


If possible please explain in detail. Any link/suggestion will be helpful.




  • Currently Being Moderated
    Oct 20, 2009 5:21 AM   in reply to GauravPatil

    possible to read barcodes using Flex?  yes,


    here's an example using a Webcam for the reader




    direct interfacing with the scanning hardware......that's the tricky part, unsure if that's possible

    Mark as:
  • Currently Being Moderated
    Oct 20, 2009 5:19 AM   in reply to GauravPatil

    Bar code readers work just like a keyboard.  When you scan the information, it goes into the program that is currently open.  That could be a Flex application if you have a TextInput selected.  It could be a text editor, or Microsoft Word, or any other program.


    However, Flex cannot get direct access to the device.  I doubt anything browser based can.


    You are correct that Flex will hvae access to anything to the Flash Player does.  But, the Flash Player's access to the client machine is limited by the browser's security sandbox.

    Mark as:
  • Currently Being Moderated
    Oct 20, 2009 6:12 AM   in reply to JeffryHouser

    As most of the barcode scanners are keyboad wedge you'll get the information as it was typed in the keyboard, but if by any chance need to access the hardware you could use Merapi, which allows you to connect to devices through a Java, the only problem is that you'll have to install the application in the client machine...


    We recently used it to connect an Flex/Air application to a MagneticStripeReader, SignatureCapture and a PinPad and it worked perfectly




    Mark as:
  • Currently Being Moderated
    Oct 20, 2009 6:19 AM   in reply to Gus187

    Will Merapi work with a web based application?  Will there be cross domain issues?  Will Flash in the browser access access a local IP address?  Will Merapi return a cross domain file?


    I guess conceptually it should work, but Merapi was designd to extend AIR, not web applications.

    Mark as:
  • Currently Being Moderated
    Oct 20, 2009 1:05 PM   in reply to GauravPatil

    The mag stripe reader and pinpad should present any input to the input buffer - same as the keyboard.  If the signature capture presents itself as a 'camera' to the system, then it would also be accessible without AIR.  If not, no browser based development will let you get direct access to the hardware, that violates the security sandbox of that platform.  You would need to resort to Java, Active-X, or even a small python 'wedge' to deal with that.

    Mark as:
  • Currently Being Moderated
    Jan 23, 2013 8:28 AM   in reply to oldMster

    Hello friends, please if anyone can help.


    I really need to read barcodes EAN 13 and others.


    In ActionScript (Flex or Air Mobile)


    Thank you.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points