betamini / react-native-datalogic-module

React Native Datalogic Module for Datalogic Android devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-datalogic-module

Library that exposes the Datalogic Android (Kotlin) SDK as a React Native Module.

Installation

yarn add @datalogic/react-native-datalogic-module
                    OR
npm i @datalogic/react-native-datalogic-module

Documentation

Documentation is available here.

Usage

import { BarcodeManager } from "@datalogic/react-native-datalogic-module";
import { NativeEventEmitter, Alert } from 'react-native';
// ...
React.useEffect(() => {
    try {
      const eventEmitter = new NativeEventEmitter(BarcodeManager);
      eventEmitter.addListener('successCallback', (map) => {
        Alert.alert('Barcode Result', map.barcodeData + '\n' + map.barcodeType);
      });
      BarcodeManager.addReadListener();
    } catch(e) {
      console.error(e);
    }
  }, []);

About

React Native Datalogic Module for Datalogic Android devices


Languages

Language:Kotlin 41.3%Language:JavaScript 20.2%Language:Java 11.6%Language:C++ 10.7%Language:Objective-C++ 5.6%Language:Objective-C 3.7%Language:Ruby 3.0%Language:Makefile 2.3%Language:Starlark 0.9%Language:TypeScript 0.6%Language:Shell 0.2%