Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-zebra-scanner-spectrum

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-zebra-scanner-spectrum

Cordova Zebra Scanner Plugin for the built-in barcodes scanner.

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

Zebra Barcode

This plugin defines an window.plugins.zebra object which provides an API for interacting with scanner hardware scanner on Zebra devices.
The window.plugins.zebra object is not available until after the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(window.plugins.zebra);
}

This plugin is based on https://github.com/darryncampbell/EnterpriseBarcodePoC by Darryn Campbell

Install

Cordova: cordova plugin add cordova-plugin-zebra-scanner-spectrumr

Tested successfully with

  • Zebra TC21 - Android 10

Supported Platforms

  • Android

window.plugins.zebra.available

Boolean which is true when the EMDK scanner is available on the device.

Example

if (window.plugins.zebra.available) {
    console.log("EMDK is available");
);

window.plugins.zebra.startHardRead

Enables the barcode scanner hardware and the associated trigger, so pressing the hardware trigger will initiate a scan.

window.plugins.zebra.startHardRead(enableSuccess, enableFailure);

Example

window.plugins.zebra.startHardRead(
    function (scannedObj) {
        console.log("Scan data: " + scannedObj.data);
        console.log("Scan symbology: "  + scannedObj.type);
        console.log("Scan time: " + scannedObj.timestamp);
    },
    function (status) {
        console.log("Scanner failure: " + status.message);
    }
);

window.plugins.zebra.startSoftRead

Enables the barcode scanner hardware and the associated trigger, it will start scanning immediately without the need of a hardware trigger.

window.plugins.zebra.startSoftRead(enableSuccess, enableFailure);

Example

window.plugins.zebra.startSoftRead(
    function (scannedObj) {
        console.log("Scan data: " + scannedObj.data);
        console.log("Scan symbology: "  + scannedObj.type);
        console.log("Scan time: " + scannedObj.timestamp);
    },
    function (status) {
        console.log("Scanner failure: " + status.message);
    }
);

window.plugins.zebra.stopReading

Stops the currently active scan.

window.plugins.zebra.stopReading();

Keywords

FAQs

Package last updated on 21 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc