🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@bishosba/honeywell-barcode-reader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@bishosba/honeywell-barcode-reader

A barcode reader for Honeywell handheld devices like Honeywell EDA50K (tested)

unpublished
latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

React Native Honeywell Barcode Reader

This package works with Honeywell devices that have an integrated barcode scanner, like the Honeywell EDA50K and EDA51 (tested).

This version fixed the event will fire twice.

This version is a fork from https://github.com/duytq94/react-native-honeywell-barcode-reader

Installation

npm i @bishosba/honeywell-barcode-reader
react-native link @bishosba/honeywell-barcode-reader
  • In app\build.gradle add
implementation project(':@bishosba/honeywell-barcode-reader')
  • In settings.gradle add
include ':@bishosba/honeywell-barcode-reader'
project(':@bishosba/honeywell-barcode-reader').projectDir = new File(rootProject.projectDir, '../node_modules/@bishosba/honeywell-barcode-reader/android')
  • In MainApplication.java

Add this line to import package

import com.duytq94.HoneywellBarcodeReader.HoneywellBarcodeReaderPackage;

and add this line to getPackages()

new HoneywellBarcodeReaderPackage()

Usage

First you'll want to check whether the device is a Honeywell scanner:

import HoneywellBarcodeReader from "@bishosba/honeywell-barcode-reader";

HoneywellBarcodeReader.isCompatible; // true or false

The barcode reader needs to be "claimed" by your application; meanwhile no other application can use it. You can do that like this:

HoneywellBarcodeReader.startReader().then((claimed) => {
  console.log(claimed ? "Barcode reader is claimed" : "Barcode reader is busy");
});

To get events from the barcode scanner:

HoneywellBarcodeReader.onBarcodeReadSuccess((event) => {
  console.log("Received data", event);
});

HoneywellBarcodeReader.onBarcodeReadFail(() => {
  console.log("Barcode read failed");
});

To free the claim and stop the reader, also freeing up resources:

HoneywellBarcodeReader.stopReader().then(() => {
  console.log("Freedom!");
});

To stop receiving events:

HoneywellBarcodeReader.offBarcodeReadSuccess();
HoneywellBarcodeReader.offBarcodeReadFail();

Keywords

honeywell

FAQs

Package last updated on 23 Jul 2023

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