Socket
Book a DemoInstallSign in
Socket

react-native-honeywell-barcode-scanner

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-honeywell-barcode-scanner

## Installation

2.0.1
latest
npmnpm
Version published
Maintainers
1
Created
Source

react-native-honeywell-barcode-scanner

Installation

$ npm install react-native-honeywell-barcode-scanner --save

Android (iOS not supported)

  • Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNHoneywellBarcodeScannerPackage; to the imports at the top of the file
  • Add new RNHoneywellBarcodeScannerPackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:
    include ":react-native-honeywell-barcode-scanner"
    project( ":react-native-honeywell-barcode-scanner" ).projectDir = new File( rootProject.projectDir, "../node_modules/react-native-honeywell-barcode-scanner/android" )
    
  • Insert the following lines inside the dependencies block in android/app/build.gradle:
     implementation project( ":react-native-honeywell-barcode-scanner" )
    

More configuration:

  • Append the following line to android/settings.gradle:

    include ":DataCollection"
    
  • Cut DataCollection folder and paste in in android

  • Open up AndroidManifest.xml and set tools:node value to replace:

    <manifest xmlns:tools="http://schemas.android.com/tools"
        <application tools:node="replace" ... >
            ...
        </application>
        ...
    </manifest>
    

Usage

import {
 StartReader,
 StopReader,
 OnBarcodeScan,
 DestroyListener,
 SetAutomaticMode,
 SetManualMode
} from "react-native-honeywell-barcode-scanner";

/* Starts the barcode reader. */
StartReader();

/* Stops the barcode reader. */
StopReader();

/* Listens to the barcode sensor reader event. */
OnBarcodeScan( callback );

/* Removes the barcode sensor listener. */
DestroyListener();

/* Sets the barcode reader's mode to manual. */
SetManualMode();

/* Sets the barcode reader's mode to automatic. */
SetAutomaticMode();

Keywords

react-native

FAQs

Package last updated on 17 May 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.