Barcode Scanning Via Mobile Browser?

Viewed 3570

I am looking at trying to scan barcodes from a mobile device.

I been doing some research and I having hard time finding JavaScript libraries that can do this.

I see these projects

zxing

This seems to be no longer in development and just bugs fixes are done?

QuaggaJS

This one, I am not sure if it is development either anymore as changelog is from 2017

quagga2

This seems to be a fork of the one above? So this might be the better choice to go with vs the 2?

What I am trying to achieve is this. I want to go on an andriod device (think phone, maybe tablet), load up chrome or firefox, go to my site click a button and load up the devices camera and scan a bar code (mostly EAN-8/13).

I want to do the same thing on apple devices (iphone and ipad), load up safari (not sure if they got chrome and Firefox on these devices. I don't own apple), click a button and load up their devices cameras and scan a bar code.

I think this is possible in all the libraries I listed above, but I am still unclear if this is possible on apple devices? I read somewhere that before ios 14 it would not be possible?

I am open to other libaries, I can use Jquery, vanilla javascript and I think angular (but I think it is version 3).

3 Answers

Just been doing this same research myself. All of those open source ones you listed seem to be either dead or have performance/reliability issues. Looks like only the commercial versions are really viable at the moment:

There are also two different mobile apps that are viable. These are web apps that just display a browser view and make a barcode scanning function from the app itself available on the page:

The second one has a more capable JS API of the two.

UPDATE: I went with that last option from Mochasoft. Turned out quite well.

Related