Search code examples
javascriptbarcode-scanner

How to integrate barcode scanner into a website?


I am currently creating a website, and I need to integrate barcode scanner on it. The website is build with HTML and CSS. I want to have a live stream barcode scanner. When you go to the website I want the clients to be able to scan the barcode and then to show the image of an item that they have scanned. So, can you tell me how to integrate barcode scanner on the website and how to make it show the image of the scanned item.


Solution

  • You can read input from barcode scanner using a java application (or any language of your choice) locally.

    For e.g. following explains reading from barcode scanner using java

    Barcode Scanner implementation on Java

    Once you read in java, you can use websockets to send data to web app. Since websockets are bi-directional, no page refresh will be required and as data comes on socket your web application can respond.

    I have created similar application using firebase for web sockets.