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.
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
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.
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
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.
Your replies have been very helpful. We need to give it a try using a scanner only then we can decide whether to use Flex in application development or not.
Please suggest any workarround or any thing kind of source code which you found during your RnD phase.
Thanks for the information mate.
My application isnt a Desktop application, its a web application so the Flash will run in web browser only. So are you saying that you had developed a web application and you managed to access the Magnatic stripeReader, Signature Capture and Pinpad??If so thats greate,we will head to that direction then. But i guess you must have developed a desktop application with ADOBE AIR.
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.