npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@castrintt/castro-barcode-reader

v2.0.0

Published

React Native Honeywell Barcode Reader with notification control

Readme

@castrintt/castro-barcode-reader

npm version License: MIT

React Native library for Honeywell barcode scanners with enhanced notification control.

Fork of react-native-honeywell-barcode-reader with additional features.

✨ Features

  • ✅ Read barcodes from Honeywell integrated scanners
  • NEW: Disable/enable scanner notifications (sound & vibration)
  • NEW: Generic property setters for advanced configuration
  • ✅ TypeScript support
  • ✅ Compatible with modern React Native versions

📱 Supported Devices

  • Honeywell EDA60K
  • Honeywell EDA61K
  • Honeywell CT50/CT60
  • Other Honeywell devices with integrated scanners

🚀 Installation

npm install @castrintt/castro-barcode-reader

or

yarn add @castrintt/castro-barcode-reader

Android Configuration

Add to android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="com.honeywell.decode.permission.DECODE"/>

📖 Usage

Basic Example

import HoneywellBarcodeReader from '@castrintt/castro-barcode-reader';

// Check compatibility
if (HoneywellBarcodeReader.isCompatible) {
  console.log('Device is compatible!');
}

// Start reader
const claimed = await HoneywellBarcodeReader.startReader();
if (claimed) {
  console.log('Scanner claimed successfully');
  
  // Disable notifications
  await HoneywellBarcodeReader.disableScannerNotifications();
}

// Listen for scans
HoneywellBarcodeReader.onBarcodeReadSuccess((event) => {
  console.log('Barcode:', event.data);
});

HoneywellBarcodeReader.onBarcodeReadFail(() => {
  console.log('Scan failed');
});

// Stop reader when done
await HoneywellBarcodeReader.stopReader();
HoneywellBarcodeReader.offBarcodeReadSuccess();
HoneywellBarcodeReader.offBarcodeReadFail();

React Hook Example

import { useEffect } from 'react';
import HoneywellBarcodeReader from '@castrintt/castro-barcode-reader';

function useBarcodeScanner(onScan: (data: string) => void) {
  useEffect(() => {
    if (!HoneywellBarcodeReader.isCompatible) return;

    const startScanner = async () => {
      const claimed = await HoneywellBarcodeReader.startReader();
      if (claimed) {
        await HoneywellBarcodeReader.disableScannerNotifications();
        
        HoneywellBarcodeReader.onBarcodeReadSuccess((event) => {
          onScan(event.data);
        });
      }
    };

    startScanner();

    return () => {
      HoneywellBarcodeReader.stopReader();
      HoneywellBarcodeReader.offBarcodeReadSuccess();
      HoneywellBarcodeReader.offBarcodeReadFail();
    };
  }, [onScan]);
}

🎯 API Reference

Methods

isCompatible: boolean

Check if the device has a Honeywell scanner.

startReader(): Promise<boolean>

Start the barcode reader. Returns true if successfully claimed.

stopReader(): Promise<void>

Stop the barcode reader and release resources.

disableScannerNotifications(): Promise<boolean> 🆕

Disable sound and vibration notifications.

enableScannerNotifications(): Promise<boolean> 🆕

Re-enable sound and vibration notifications.

setReaderProperty(propName: string, value: boolean): Promise<boolean> 🆕

Set a boolean property on the scanner.

setReaderPropertyInt(propName: string, value: number): Promise<boolean> 🆕

Set an integer property on the scanner.

setReaderPropertyString(propName: string, value: string): Promise<boolean> 🆕

Set a string property on the scanner.

onBarcodeReadSuccess(handler: (event: { data: string }) => void): void

Register a callback for successful barcode reads.

onBarcodeReadFail(handler: () => void): void

Register a callback for failed barcode reads.

offBarcodeReadSuccess(): void

Remove the barcode read success callback.

offBarcodeReadFail(): void

Remove the barcode read fail callback.

🔧 Advanced Configuration

// Custom property examples
await HoneywellBarcodeReader.setReaderProperty(
  'PROPERTY_TRIGGER_CONTROL_MODE',
  'TRIGGER_CONTROL_MODE_AUTO_CONTROL'
);

await HoneywellBarcodeReader.setReaderPropertyInt(
  'PROPERTY_DECODE_TIMEOUT',
  5000
);

📝 License

MIT

🙏 Credits

Based on duytq94/react-native-honeywell-barcode-reader

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

📧 Support

For issues and questions, please use the GitHub Issues page.



├── .gitignore ✅
└── .npmignore ✅ (novo)