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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-svg-path

v1.0.0

Published

show svg picture by path.

Downloads

24

Readme

react-native-qrscanner-kit

基于react-native-camera

 增加扫描覆盖界面 ,扫描出结果后,不再继续解析二维码。通过调用shouldQR来再次开启继续解析二维码。

Getting started

.

Requirements

  1. JDK >= 1.7 (if you run on 1.6 you will get an error on "_cameras = new HashMap<>();")
  2. With iOS 10 and higher you need to add the "Privacy - Camera Usage Description" key to the info.plist of your project. This should be found in 'your_project/ios/your_project/Info.plist'. Add the following code:
<key>NSCameraUsageDescription</key>
<string>Your message to user when the camera is accesseded for the first time</string>

<!-- Include this only if you are planning to use the camera roll -->
<key>NSPhotoLibraryUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>

<!-- Include this only if you are planning to use the microphone for video recording -->
<key>NSMicrophoneUsageDescription</key>
<string>Your message to user when the microsphone is accessed for the first time</string>

Mostly automatic install with react-native

  1. npm install react-native-camera@https://github.com/chinaczy/react-native-camera.git --save
  2. npm install react-native-qrscanner-kit
  3. react-native link react-native-camera

Manual install

iOS

  1. npm install react-native-camera@https://github.com/lwansbrough/react-native-camera.git --save
  2. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  3. Go to node_modulesreact-native-camera and add RCTCamera.xcodeproj
  4. In XCode, in the project navigator, select your project. Add libRCTCamera.a to your project's Build PhasesLink Binary With Libraries
  5. Click RCTCamera.xcodeproj in the project navigator and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). In the Search Paths section, look for Header Search Paths and make sure it contains both $(SRCROOT)/../../react-native/React and $(SRCROOT)/../../../React - mark both as recursive.
  6. Run your project (Cmd+R)

Android

  1. npm install react-native-camera@https://github.com/lwansbrough/react-native-camera.git --save
  2. Open up `android/app/src/main/java/[...]/MainApplication.java
  • Add import com.lwansbrough.RCTCamera.RCTCameraPackage; to the imports at the top of the file
  • Add new RCTCameraPackage() to the list returned by the getPackages() method. Add a comma to the previous item if there's already something there.
  1. Append the following lines to android/settings.gradle:

    include ':react-native-camera'
    project(':react-native-camera').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-camera/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

    compile project(':react-native-camera')

Usage

import Scan from 'react-native-qrscanner-kit' ;
...
scanResult(data , callback){
    Alert.alert( "qrcode result " ,  data.data , [{text:"ok" , onPress:()=>callback()}],{cancelable:false}) ; 
  }
  render() {
    
    return (
      <View style={{flex:1 }}>
        <Scan
          
          onBarCodeRead={this.scanResult.bind(this)}
          />
        
      </View>
    );
  }
}

more about Camera go to