Socket
Book a DemoInstallSign in
Socket

react-native-barcode-scanner-fabric

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-barcode-scanner-fabric

test

0.1.20
latest
Source
npmnpm
Version published
Weekly downloads
6
-40%
Maintainers
2
Weekly downloads
 
Created
Source

react-native-barcode-scanner

qr code scanner for react native

Installation

npm install react-native-barcode-scanner

  // config scan file module inside MainApplication.java
    @Override
        protected List<ReactPackage> getPackages() {
          @SuppressWarnings("UnnecessaryLocalVariable")
          List<ReactPackage> packages = new PackageList(this).getPackages();
          packages.add(new ScanQRFilePackage());
          // Packages that cannot be autolinked yet can be added manually here, for example:
          // packages.add(new MyReactNativePackage());
          return packages;
        }

Usage

import { BarcodeScannerView } from "react-native-barcode-scanner";
import { TouchableOpacity } from 'react-native';
import { scan } from 'react-native-barcode-scanner';

// supported formats: 'AZTEC' | 'CODABAR' | 'CODE_39'| 'CODE_93'| 'CODE_128' | 'DATA_MATRIX' | 'EAN_8' |'EAN_13' |  'ITF' | 'MAXICODE' |'PDF_417'| 'QR_CODE'| 'RSS_14' | 'RSS_EXPANDED' | 'UPC_A' | 'UPC_E' | 'UPC_EAN_EXTENSION'
// ...
<BarcodeScannerView
        flashModeEnabled
        autoFocusEnabled
        frameBorderColor="#eb4034"
        acceptFormats={
          {
            acceptedFormats : ['QR_CODE','PDF_417']
          }
        }
        style={styles.box}
        onScanResultListener={(scanEvent) => {
            // result value
          console.log(`Result: ${scanEvent.nativeEvent.value} `);
        }}
<TouchableOpacity onPress= {async  ()=>
        {
          const result = await scan("test")
          console.log(`scanResult :${result}`)
        }

      }>
        <Text>Scan Test Image</Text>
      </TouchableOpacity>
/>

Contributing

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

License

MIT

Keywords

react-native

FAQs

Package last updated on 03 Jan 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.