$ npm install hc-camera --save
$ react-native link hc-camera
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNCameraPackage;
to the imports at the top of the file - Add
new RNCameraPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':hc-camera' project(':hc-camera').projectDir = new File(rootProject.projectDir, '../node_modules/hc-camera/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':hc-camera')
import RNCamera from 'hc-camera';
// TODO: What to do with the module?
RNCamera;