0.8.12 • Published 5 years ago

react-native-synced-cam v0.8.12

Weekly downloads
118
License
MIT
Repository
-
Last release
5 years ago

react-native-synced-cam

Getting started

$ npm install react-native-synced-cam --save $ npm install react-native-camera@2.9.0 --save $ npm install react-native-vector-icons --save $ npm install react-native-video --save $ npm install @react-native-community/cameraroll@1.2.1 --save $ npm install react-native-permissions@1.2.0 --save $ npm install react-native-community/async-storage --save $ npm install react-native-safe-area-context --save

Mostly automatic installation

$ react-native link react-native-camera $ react-native link react-native-vector-icons $ react-native link react-native-video $ react-native link @react-native-community/cameraroll $ react-native link react-native-permissions $ react-native link @react-native-community/async-storage $ react-native link react-native-safe-area-context

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-synced-cam and add RNSyncedCam.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNSyncedCam.a to your project's Build PhasesLink Binary With Libraries
  4. Add $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) to project's Library Search Paths
  5. Add empty Swift and bridging header file to project.
  6. Run project (Cmd+R)

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.reactlibrary.RNSyncedCamPackage; to the imports at the top of the file
  • Add new RNSyncedCamPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-synced-cam'
    project(':react-native-synced-cam').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-synced-cam/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-synced-cam')
  3. Add the following to android/app/build.gradle
	android {
	...
	defaultConfig {
		...
		missingDimensionStrategy 'react-native-camera', 'general' <-- insert this line
	}
	}
  1. Add the following to AndroidManifest.xml

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Usage

import RNSyncedCam from 'react-native-synced-cam';

// TODO: 
<RNSyncedCam
cropDimension={'1:1'/'4:3'}
finalURI={(uri) => console.log("this is ",uri)}
onRequestClose={() => closeCamera()}
videoOnly={true/false} 
pictureOnly={true/false}
renderPicker={true/false}
camRatio={'4:3'/'1:1'} //android only
forceCrop={true/false}  //ios only
permissionAlert={} //Alert component for users who deny permission
headerImage={} //Image component that goes on top of permissions page
camPerm={} //Component to request camera permission
galleryPerm={} //Component to request gallery permission
micPerm={}  //Component to request microphone permission
/>;

Updating Library

Login to npm Update version number in package.json Run npm publish

0.8.12

5 years ago

0.8.11

5 years ago

0.8.10

5 years ago

0.8.9

5 years ago

0.8.8

5 years ago

0.8.7

5 years ago

0.8.6

5 years ago

0.8.5

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.1

5 years ago

0.8.2

5 years ago

0.7.9

5 years ago

0.7.8

5 years ago

0.8.0

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.6

5 years ago

0.7.5

5 years ago

0.7.7

5 years ago

0.6.7

5 years ago

0.6.6

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.7.0

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.5.9

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.8

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.23

5 years ago

0.4.22

5 years ago

0.4.21

6 years ago

0.4.20

6 years ago

0.4.16

6 years ago

0.4.15

6 years ago

0.4.14

6 years ago

0.4.13

6 years ago

0.4.12

6 years ago

0.4.11

6 years ago

0.4.9

6 years ago

0.4.10

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago