I'm trying to use http://zxing.appspot.com/scan to call Barcode Scanner from a WebApp, but I can't get it to work. Even after needlessly updating and reinstalling it, all it does is show the default zxing webpage that asks me to install Barcode Scanner on my phone. Am I missing something?
Here's the javascript I'm using to call ZXing Scanner. For test purposes, I've even tried to make a simple HTML hyperlink, without success. I'm using Android's WebView
to load the app.
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 Barcode Scanner's manifest that identifies and triggers the scanner through 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>
Funny thing is, http://www.google.com/m/products/scan
, that does the same thing, works perfectly. Any help or idea is very welcome! Thanks a lot!
It looks like you're sending a URL to an image on your local network (the 192.168... IP address), which zxing.appspot.com won't be able to access over the Internet.
I think I gave some thoughts on the project mailing list, but had another bright idea:
Are you sure you haven't 'saved' your preference for handling this link in the browser? For example when you have a choice of app you're typically asked whether you want to use that app forever to open that kind of link or Intent. Maybe you did that for this link only, and Browser. Go to Applications and "Clear defaults" for all these apps and try again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With