barcode-scanner icon indicating copy to clipboard operation
barcode-scanner copied to clipboard

Web/PWA support

Open digaus opened this issue 4 years ago • 9 comments

Would be nice if this plugin can have a web implementation so we can use it in PWA apps :)

digaus avatar Apr 28 '21 13:04 digaus

At this moment im using this library for PWA: https://github.com/zxing-js/library

tripodsgames avatar Apr 28 '21 15:04 tripodsgames

We are also using zxing-js to support PWA which works well. Would be great if this were potentially integrated into the Plugin to allow for a single API to deal with all scanning across platforms.

hellokingdom avatar May 10 '21 13:05 hellokingdom

Currently our first priority is to fix other issues regarding iOS and Android since a PWA solution is easier to work around than the native stuff. It is of course not ideal, but at least most devs should be able to get a working solution since adding this feature does not require any knowledge of the native environment and most capacitor devs should be able to get things working.

Once the other issues are fixed I will look into this, if someone is willing to add some functionality in the meantime that would be awesome! Just open a PR ;) Unfortunately I can't say when I will have time to look into this.

thegnuu avatar Mar 04 '22 10:03 thegnuu

@thegnuu @hellokingdom @tripodsgames Could you point me to a scanner plugin for BarCodes, QR, etc. that has support for Web, Android and iOS?

achacofe avatar Mar 30 '22 08:03 achacofe

I have not tested it, but there is one listed in the ionic docs which seems to support all platforms right now:

https://ionicframework.com/docs/native/barcode-scanner

thegnuu avatar Mar 30 '22 09:03 thegnuu

Hello, I have tried that plugin, but it does not work in the browser as I expect, what it does on the web is open a dialog for me to enter the barcode, what I want is for it to open the cam to scan. I am using the same example from the link. You can help me?

achacofe avatar Mar 30 '22 09:03 achacofe

@achacofe This is not the right place to ask questions about other libraries. You could start out with a Google search (like https://www.google.com/search?q=barcode+scanner+npm) or open a question on Stack Overflow for example.

tafelnl avatar Mar 30 '22 09:03 tafelnl

@thegnuu @hellokingdom @tripodsgames Could you point me to a scanner plugin for BarCodes, QR, etc. that has support for Web, Android and iOS?

You can this library on native app and implement qr-scanner on PWA

qr-scanner: https://www.npmjs.com/package/qr-scanner

tripodsgames avatar Mar 30 '22 10:03 tripodsgames

As the android version is already using zxing, how about the typescript port of that, zxing-js? https://github.com/zxing-js/library

luckydonald avatar May 03 '22 21:05 luckydonald

This plugin works on the web.

iBobik avatar Apr 20 '23 08:04 iBobik

I will close this for now. The current stable release supports PWAs partially and I will rewrite the pre-release to another plugin which should provide better results than the current zxing-js implementation in the upcoming weeks.

thegnuu avatar May 08 '23 14:05 thegnuu