A high performance, easy to use, rock solid camera library for React Native apps.
Go to file
Ran Greenberg 166582a2ba refactor - selectedAssets changed to selectedImages and will be in the react-native way, the state will remain in the JS side
some more minor refactor
2016-07-25 17:28:36 +03:00
android Android: Camera reconnects on capture 2016-07-21 10:26:39 +03:00
example crash fix - fix issue when image not supported, try to add nil to an array 2016-07-19 16:04:36 +03:00
ios/lib refactor - selectedAssets changed to selectedImages and will be in the react-native way, the state will remain in the JS side 2016-07-25 17:28:36 +03:00
src update native integration, deep copy this.props 2016-07-20 11:00:42 +03:00
.flowconfig Camera kit initial commit 2016-04-14 10:44:00 +03:00
.gitignore Camera kit initial commit 2016-04-14 10:44:00 +03:00
.npmignore add npmignore 2016-07-21 09:40:39 +03:00
.watchmanconfig Camera kit initial commit 2016-04-14 10:44:00 +03:00
LICENSE Create LICENSE 2016-04-14 14:39:54 +03:00
README.md Update README.md 2016-07-14 17:18:58 +03:00
index.android.js Android Camera component 2016-07-04 14:10:21 +03:00
index.ios.js changes for android new branch 2016-06-29 16:12:53 +03:00
package.json version bump 1.0.13 2016-07-21 10:36:38 +03:00

README.md

react-native-camera-kit

Currently work in progress.

Native camera control.

Install

Install using npm:

npm install react-native-camera-kit --save

  • Locate the module lib folder in your node modules: PROJECT_DIR/node_modules/react-native-camera-kit/lib
  • Drag the ReactNativeCameraKit.xcodeproj project file into your project
  • Add libReactNativeCameraKit.a to all your target Linked Frameworks and Libraries (prone to be forgotten)

Examples

###CameraKitCamera

<CameraKitCamera
            ref={(cam) => {
                  this.camera = cam;
                }} // should be only if u want to make some actions in this specific camera instance
            style={{flex: 1, justifyContent: 'flex-end'}}
            cameraOptions={{
                    flashMode: 'auto',
                    focusMode: 'on',
                    zoomMode: 'on'
                  }}
          />

####capture Capture image

const image = await this.camera.capture(true);

####setFlashMode

Set flesh mode (auto/on/off)

const success = await this.camera.setFlashMode(newFlashData.mode);

####changeCamera

Change to fornt/rear camera

const success = await this.camera.changeCamera();

###CameraKitGalleryView

<CameraKitGalleryView
          ref={(gallery) => {
                            this.gallery = gallery;
                           }}
          style={{flex: 1, marginTop: 20}}
          minimumInteritemSpacing={10}
          minimumLineSpacing={10}
          albumName={<ALBUM_NAME>}
          columnCount={3}
          onSelected={(result) => {
              //result.nativeEvent.selected - ALL selected images Photos Framework ids
            }}
          selectedImage={require('<IMAGE_FILE_PATH>')}
          unSelectedImage={require('<IMAGE_FILE_PATH>')}
        />