Commit 1ed3f9e2 authored by cyqresig's avatar cyqresig

updated installation

parent b937cc6d
......@@ -30,6 +30,8 @@ npm install react-native-smart-barcode --save
* Dray raw folder to your project
* Add `Privacy - Camera Usage Description` property in your info.plist(for ios 10)
## Installation (Android)
* In `android/settings.gradle`
......@@ -51,7 +53,7 @@ dependencies {
}
```
* in MainApplication.java
* In MainApplication.java
```
...
......@@ -81,7 +83,7 @@ private ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
...
```
* in MainActivity.java
* In MainActivity.java
```
...
import com.reactnativecomponent.barcode.RCTCapturePackage; //import RCTCapturePackage
......@@ -109,6 +111,17 @@ protected void onCreate(Bundle savedInstanceState) {
}
```
* In AndroidManifest.xml, add camera permissions
```
...
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
...
```
## Full Demo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment