New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-zepra-scanner-1

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-zepra-scanner-1

react-native-zepra-scanner

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-zippra-scanner

Zebra scanner for react native ("https://www.zebra.com/us/en/support-downloads/software/developer-tools/scanner-sdk-for-android.html")

Installation

npm install react-native-zippra-scanner

Download sdk folder: ("https://drive.google.com/file/d/1NUedeRy3AKSOgmNNjm9lkzEotno8AOzR/view")

Extract the file then add it => {Your Project}/android/BarcodeScannerLibrary

Add this to {Your Project/android/app/build.gradle}
dependencies {
    // all modules
    +implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
    +implementation project(':BarcodeScannerLibrary')
}

Add this inside settings.gradle
include ':BarcodeScannerLibrary'


Usage

import { 
    requestBluethoothAccess, 
    findCabledScanner, 
    findBluetoothScanner, 
    setupApi
} from "react-native-zippra-scanner";

// ...

const App = () => {
    useEffect(() => {
        // .. request access to bluetooth promise then setup main config of module
        requestBluethoothAccess(setupApi)

        // .. add listeners 
        DeviceEventEmitter.addListener('BARCODE_RECEIVED', (value: string) => {
            console.log({
                value
            })
        });

        DeviceEventEmitter.addListener('SCANNER_DISAPPEARED', () => alert('SCANNER_DISAPPEARED'));
        DeviceEventEmitter.addListener('SCANNER_ESTABLISHED', () => alert('SCANNER_ESTABLISHED'));
        DeviceEventEmitter.addListener('SESSION_TERMINATED', () => alert('SESSION_TERMINATED'));
    }, [])

    const conncetUsbButtonPressed = () => {
        // .. connect the device before open this page
        findCabledScanner();
    }

    const connectBluethoothButtonPressed = () => {
        // .. change this with bluetooth address of you mobile
        const bluetoothAddressOfYoutMobile = "A4:C7:4B:3B:38:F5";
        findBluetoothScanner(bluetoothAddressOfYoutMobile);
    }

    return (
        <View>
            <Button title={"Connect usb device"} onPress={conncetUsbButtonPressed} />
            <Button title={"Connect bluetooth device"} onPress={connectBluethoothButtonPressed} />
        </View>
    )
}


Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Keywords

FAQs

Package last updated on 20 Dec 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc