tags:

views:

134

answers:

2

I love the BarCode Scanner application for the Android phone (we're using Motorola's Droid). Is it possible to access the BarCode Scanner from a web application running on the phone? I was thinking of using a WebView, but I'm not sure how I'd access the Scanner API.

Regards, Scott

A: 

You can utilize it using Intents. The contract is here.
Should probably add a custom Javascript handler to the WebView in order to fire an Intent and parse the result.

alex
A: 

Developer here. The answer is yes and no. At the moment, yes, you can see this working if you go to Google Product Search on Android. You'll see a scan barcode button which launches Barcode Scanner -- apps can respond to URLs clicked in the browser, yes.

Barcode Scanner is hard-coded to respond after scanning by sending you to a product result page from Google Product Search. So at the moment, no, it can't be made to redirect you anywhere else.

But, this week a change was checked in to allow you to do exactly this. It'll be available in an upcoming Barcode Scanner version.

Sean Owen