1.1.4 • Published 2 years ago

cordova-plugin-ia-mlkit-scanner v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

MLKit Barcode Scanner

Latest Stable Version Total Downloads

Scan barcodes using the Google MLKit. This plugin supports the android and ios platforms.

Installation

cordova plugin add cordova-plugin-ia-mlkit-scanner

If using Ionic:

ionic cordova plugin add cordova-plugin-ia-mlkit-scanner

Usage

Barcode Scanner

To call up the barcode scanner, refer to this example code:

enum CameraFacing {
  BACK = 0,
  FRONT = 1
}

function onSuccess(barcode) {
  console.log("Success:" + barcode);
}

function onError(message) {
  console.log("Error:" + message);
}

window["MLKitBarcodeScanner"].scanBarcode(CameraFacing.FRONT, onSuccess, onError);

Check Play Service Availability (ANDROID)

As this plugin is based on Google's MLKit, Play services is required for it to function correctly on Android devices. You can check if the host device has support, by calling checkSupport:

function onSuccess(isSupported) {
  console.log("Has Support: " + isSupported);
}

function onError(message) {
  console.log("Error: " + message);
}

window["MLKitBarcodeScanner"].checkSupport(onSuccess, onError);
1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago