@datalogic/react-native-datalogic-module
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

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);
    }
  }, []);

/@datalogic/react-native-datalogic-module/

    Package Sidebar

    Install

    npm i @datalogic/react-native-datalogic-module

    Weekly Downloads

    61

    Version

    2.0.3

    License

    MIT

    Unpacked Size

    987 kB

    Total Files

    124

    Last publish

    Collaborators

    • datalogicmobile
    • bronson.mock
    • codybrookshear
    • sshankar