1.6.0 • Published 6 years ago

react-native-ocr-lib v1.6.0

Weekly downloads
29
License
-
Repository
-
Last release
6 years ago

react-native-ocr-lib

Getting started

$ npm install react-native-ocr-lib --save

Mostly automatic installation

$ react-native link react-native-ocr-lib

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-ocr-lib and add RNMyOcrLibNew.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNMyOcrLibNew.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNMyOcrLibNewPackage; to the imports at the top of the file
  • Add new RNMyOcrLibNewPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
include ':react-native-ocr-lib'
project(':react-native-ocr-lib').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-ocr-lib/android')
  1. Insert the following lines inside the dependencies block in android/app/build.gradle:
compile project(':react-native-ocr-lib')

###libraries Used 
-->Google Vision for OCR
//compile 'com.google.android.gms:play-services-vision:11.0.4'
-->Realm for data save in DB
//compile 'io.realm:realm-android:0.87.4'

##Java Files
//ImagesRecord modle class for DB
//RNOCRlibModule main functionalities for wrapper 
    //Methods : extractImageData() native method for communcating with react native and get saved image path in device
//RNOcrLibPackage packager class for adding module class in library

# react-native-ocr-lib

## Getting started

`$ npm install react-native-ocr-lib --save`

### Mostly automatic installation

`$ react-native link react-native-ocr-lib`


## Usage
```javascript
import RNOcrLib from 'react-native-ocr-lib';

// TODO: What to do with the module?
RNOcrLib;

//in react native where you want native method to perform task
RNOcrLib.extractImageData(DataToSend);



  
1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago