ZXing Barcode Scanner for Webapps

I am trying to use http://zxing.appspot.com/scan to call a barcode scanner from WebApp, but I cannot get it to work. Even after unnecessarily updating and reinstalling, all it does is show the default zxing webpage, which asks me to install a barcode scanner on my phone. Did I miss something?

Here's the javascript that I use to invoke the ZXing scanner. For testing purposes, I even tried to make a simple HTML hyperlink without success. I use Android WebViewto download the application.

window.location.href = 
"http://zxing.appspot.com/scan?ret=http://192.168.1.33:3000/pallet/{CODE}/change_position/"+positionId+"&SCAN_FORMATS=CODE_39";

And this is the manifest of the barcode scanner that identifies and launches the scanner through the browser:

<intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data android:scheme="http" android:host="zxing.appspot.com" android:path="/scan"/>
</intent-filter>

It's funny http://www.google.com/m/products/scanthat doing the same thing works great. Any help or idea is greatly appreciated! Many thanks!

+5
source share
5 answers

It looks like you are sending an image URL on your local network (192.168 ... IP address) that zxing.appspot.com will not be able to access over the Internet.

+2
source

I think I told you something about the project mailing list, but I had another bright idea:

, ? , , , , ​​ . , . " " .

+1

:

zxing://scan/?ret=http://192.168.2.9/stock/add.php?barcode={CODE}
+1

, Chrome Chrome

0

, HTML Angular 2+:

  1. ,

 this.callbackUrl = encodeURIComponent('${currentURL}{CODE}&SCAN_FORMATS=Code 39');
 this.totalBarCodeUrl = 'http://zxing.appspot.com/scan?ret=${this.callbackUrl}';
Hide result
  1. HTML :

 <a [href]="totalBarCodeUrl"></a>
Hide result
0

All Articles