Skip to content
This repository was archived by the owner on Apr 1, 2022. It is now read-only.

Latest commit

 

History

History
34 lines (27 loc) · 758 Bytes

File metadata and controls

34 lines (27 loc) · 758 Bytes

cordova-plugin-google-mobile-vision-barcode-scanner

Purpose of this Project

Enable cordova / phonegap to scan barcodes using Google Mobile Vision

Installation

cordova plugin add cordova-plugin-google-mobile-vision-barcode-scanner

Usage

To call the plugin first get default scan settings from cordova.plugins.scanner.getDefaultSettings(). Then call cordova.plugins.scanner.startScanning().

var settings = cordova.plugins.scanner.getDefaultSettings();

cordova.plugins.scanner.startScanning(
  p_Result => {
    alert(p_Result);
  }, 
  p_Error => {
    throw p_Error
  }, 
  settings
);

Output

startScanning() returns a string with the scan result.