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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-urovo-scanner

v1.0.0

Published

React Native package for Urovo Scanner SDK integration - Official SDK implementation

Readme

React Native Urovo Scanner

npm version Platform License

React Native package for Urovo Scanner SDK integration using the official Urovo SDK v4.1.0326. This package provides a complete TypeScript interface for barcode scanning functionality on Urovo handheld devices.

📱 Features

  • Official Urovo SDK Integration - Uses the official Urovo SDK v4.1.0326
  • Complete TypeScript Support - Full type definitions and IntelliSense
  • Multiple Trigger Modes - ONESHOT, CONTINUOUS, PULSE
  • Comprehensive Barcode Support - QR, Code128, Code39, EAN13, EAN8, UPC-A, UPC-E, DataMatrix, PDF417, Aztec
  • Advanced Configuration - Sound, vibration, keyboard wedge, and more
  • Manual Laser Control - Press/release laser control
  • React Hooks - Modern React patterns with custom hooks
  • Configuration UI Component - Ready-to-use configuration interface

🔧 Installation

npm install react-native-urovo-scanner

Android Setup

  1. Add the following to your android/app/build.gradle:
dependencies {
    implementation project(':react-native-urovo-scanner')
}
  1. Add the package to your MainApplication.java:
import com.reactnativeurovoscanner.UrovoScannerPackage;

public class MainApplication extends Application implements ReactApplication {
    // ...
    
    @Override
    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
            new MainReactPackage(),
            new UrovoScannerPackage() // Add this line
        );
    }
}
  1. Add permissions to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />

🚀 Usage

Basic Usage

import React, { useEffect, useState } from 'react';
import { View, Text, Alert } from 'react-native';
import { useUrovoScanner, ScanResult } from 'react-native-urovo-scanner';

const App = () => {
  const [scanResults, setScanResults] = useState<ScanResult[]>([]);

  const handleScan = (result: ScanResult) => {
    setScanResults(prev => [result, ...prev]);
    Alert.alert('Scanned', `Value: ${result.value}\nType: ${result.symbology}`);
  };

  const { isOpened } = useUrovoScanner({
    onScanResult: handleScan,
    autoOpen: true,
  });

  return (
    <View style={{ flex: 1, padding: 20 }}>
      <Text>Scanner Status: {isOpened ? 'Ready' : 'Not Available'}</Text>
      {scanResults.map((result, index) => (
        <Text key={index}>
          {result.value} ({result.symbology})
        </Text>
      ))}
    </View>
  );
};

Advanced Usage with Configuration

import React, { useState } from 'react';
import { View, Button, Modal } from 'react-native';
import { 
  useUrovoScanner, 
  ScannerConfiguration, 
  TRIGGER_MODES 
} from 'react-native-urovo-scanner';

const App = () => {
  const [showConfig, setShowConfig] = useState(false);
  
  const { isOpened, startScan, stopScan } = useUrovoScanner({
    onScanResult: (result) => {
      console.log('Scan result:', result);
    },
  });

  return (
    <View style={{ flex: 1, padding: 20 }}>
      <Button 
        title="Open Configuration" 
        onPress={() => setShowConfig(true)} 
      />
      
      <Button 
        title="Start Manual Scan" 
        onPress={startScan}
        disabled={!isOpened}
      />
      
      <Button 
        title="Stop Manual Scan" 
        onPress={stopScan}
        disabled={!isOpened}
      />

      <Modal visible={showConfig} animationType="slide">
        <ScannerConfiguration onClose={() => setShowConfig(false)} />
      </Modal>
    </View>
  );
};

📚 API Reference

Hooks

useUrovoScanner(options)

Main hook for scanner functionality.

Parameters:

  • options.onScanResult?: (result: ScanResult) => void - Callback for scan results
  • options.onScanError?: (error: ScanError) => void - Callback for scan errors
  • options.autoOpen?: boolean - Auto-open scanner on mount (default: true)

Returns:

  • isOpened: boolean - Scanner availability status
  • isScanning: boolean - Current scanning status
  • openScanner: () => Promise<boolean> - Open scanner function
  • closeScanner: () => Promise<boolean> - Close scanner function
  • startScan: () => Promise<boolean> - Start scanning function
  • stopScan: () => Promise<boolean> - Stop scanning function
  • error: string | null - Current error state

useScannerConfiguration()

Hook for advanced scanner configuration.

Returns:

  • config: ScannerConfiguration | null - Current configuration
  • constants: PropertyIDConstants | null - PropertyID constants
  • loading: boolean - Loading state
  • error: string | null - Error state
  • updateParameter: (propertyId: number, value: number) => Promise<boolean> - Update parameter function
  • refreshConfiguration: () => Promise<void> - Refresh configuration function

Components

ScannerConfiguration

Ready-to-use configuration component with UI for all scanner settings.

Props:

  • onClose?: () => void - Callback when closing the configuration

Constants

TRIGGER_MODES

export const TRIGGER_MODES = {
  SCAN_TRIGGER_MODE_ONESHOT: 0,    // One scan per trigger
  SCAN_TRIGGER_MODE_CONTINUOUS: 1,  // Continuous scanning
  SCAN_TRIGGER_MODE_PULSE: 2,       // Pulse scanning
};

SCAN_MODES

export const SCAN_MODES = {
  SCAN_MODE_BROADCAST: 0,  // Broadcast mode
  SCAN_MODE_STORAGE: 1,    // Storage mode
  SCAN_MODE_WEDGE: 2,      // Keyboard wedge mode
};

Types

ScanResult

interface ScanResult {
  value: string;      // Scanned barcode value
  symbology: string;  // Barcode type (QR, CODE128, etc.)
}

ScannerConfiguration

interface ScannerConfiguration {
  qrCode: number;
  code128: number;
  code39: number;
  ean13: number;
  ean8: number;
  upca: number;
  upce: number;
  dataMatrix: number;
  pdf417: number;
  aztec: number;
  keyboardWedge: number;
  beepEnabled: number;
  vibrateEnabled: number;
}

🎯 Supported Barcode Types

  • QR Code - Quick Response codes
  • Code 128 - High-density linear barcode
  • Code 39 - Alphanumeric barcode
  • EAN-13 - European Article Number
  • EAN-8 - Short EAN barcode
  • UPC-A - Universal Product Code
  • UPC-E - Compressed UPC
  • Data Matrix - 2D matrix barcode
  • PDF417 - Stacked linear barcode
  • Aztec - 2D matrix barcode

📱 Compatible Devices

  • Urovo CT58 - Handheld terminal
  • Urovo CT60 - Handheld terminal
  • Urovo RT40 - Rugged tablet
  • Other Urovo Android devices with built-in scanners

🔧 Configuration Options

Trigger Modes

  • ONESHOT: Single scan per trigger activation
  • CONTINUOUS: Continuous scanning while trigger is held
  • PULSE: Rapid pulse scanning

Barcode Types

Enable/disable specific barcode types:

  • QR Code, Code 128, Code 39
  • EAN-13, EAN-8, UPC-A, UPC-E
  • Data Matrix, PDF417, Aztec

Behavior Settings

  • Sound: Enable/disable scan success beep
  • Vibration: Enable/disable scan success vibration
  • Keyboard Wedge: Enable/disable keyboard input mode

🛠️ Development

Requirements

  • React Native 0.60+
  • Android SDK 21+
  • Urovo device with official SDK support

Building

git clone https://github.com/gglibaak/react-native-urovo-scanner.git
cd react-native-urovo-scanner
npm install
npm run build

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please read the Contributing Guide for details.

📞 Support

🙏 Acknowledgments

  • Built with the official Urovo SDK v4.1.0326
  • Designed for professional barcode scanning applications
  • Optimized for Urovo handheld devices

Made with ❤️ for the Urovo developer community