1.0.8 • Published 4 years ago

react-native-object-detector v1.0.8

Weekly downloads
37
License
-
Repository
-
Last release
4 years ago

react-native-object-detector

Getting started

$ npm install react-native-object-detector --save

Mostly automatic installation

$ react-native link react-native-object-detector

Manual installation

iOS

  1. Add the following to podfile
    pod 'RNObjectDetector', :path => '../node_modules/react-native-object-detector/ios', :subspecs => [
    	'ObjectDetector'
    ]
  2. Run pod install
  3. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.lts.objectdetector.RNObjectDetectorPackage; to the imports at the top of the file
  • Add new RNObjectDetectorPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-object-detector'
    project(':react-native-object-detector').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-object-detector/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-object-detector')
  3. Set screen orientation to portrait in AndroidManifest.xml:
    ```
    android:screenOrientation="portrait"
    ```

Usage

import ObjectDetector from 'react-native-object-detector';

<ObjectDetector 
	sampleImage={require('./sample.jpg')}
	onObjectCaptured={this.onObjectCaptured}
	detectionCountBeforeCapture={3}
	overlayColor="#00FF0080"
/>
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago