WebViewGold Documentation · Android
🇺🇸 English
Get WebViewGold

Barcode Scanner API

Scan EAN, UPC, and other barcodes natively in your Android WebView app and hand results to your web app.

The WebViewGold Barcode Scanner API enables your WebView-based app to activate the device camera for scanning barcodes. Once a barcode is successfully scanned, the result is automatically passed back into your web content.

Use Cases:

  • Scanning product barcodes for inventory systems
  • Processing tickets or access codes in logistics or event apps
  • Enabling fast data capture from printed barcodes

How to Trigger the Scanner:

Use the following HTML to start the native barcode scanner:

<a href="barcodescanner://">Start Barcode Scanner</a>
<a href="#" onClick="alert(barcodescanresult);">Show Scan Result</a>
  • Start Barcode Scanner: Opens the device camera to detect supported barcode formats
  • Show Scan Result: Displays the scanned barcode content stored in the barcodescanresult JavaScript variable

Technical Note: After scanning, the decoded barcode value is injected into the current page via the barcodescanresult JavaScript variable. You can use this variable to auto-fill forms, trigger custom logic, or perform lookups based on scanned data.

Permissions: Make sure the app has access to the device camera, as it is required for barcode scanning to function properly.

Too busy? We set up your app for you.

Our team configures, builds & submits your WebViewGold app — done-for-you, fast turnaround, Made in Germany.

Get your app set up →

Build in your browser

No Mac, no IDE: the WebViewGold Cloud Builder configures, builds & uploads your app online.

Discover Cloud Builder →