Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-pure-code-view

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-pure-code-view

qrcode, barcode, scanner for react native

  • 0.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-pure-code-view

There are three native views in this module.

  • BarCodeView: a barcode generator
  • QRCodeView: a qrcode generator
  • CodeScanner: a scanner which can recognizes barcode and qrocde

Installation

npm i react-native-pure-code-view
// link below 0.60
react-native link react-native-pure-code-view

Setup

iOS

Add NSCameraUsageDescription in your ios/${ProjectName}/Info.plist:

<key>NSCameraUsageDescription</key>
<string>balabala</string>

Android

Add jitpack in your android/build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Usage

import {
  BarCodeView,
  QRCodeView,
  CodeScanner,
} from 'react-native-pure-code-view'

// BarCodeView
<BarCodeView
  text="xx",
  style={styles.barcode}
/>

// QRCodeView
<QRCodeView
  text="xx",
  style={styles.qrcode}
/>

// At first, make sure you have the permissions.
// ios: CAMERA
// android: CAMERA

// If you don't have these permissions, you can't use CodeScanner.

// CodeScanner
<CodeScanner
  title="将二维码放入框内,即可自动扫描"
  onScanSuccess={this.handleScanSuccess}
  style={styles.codeScanner}
/>

Keywords

FAQs

Package last updated on 19 Sep 2022

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