From 4e6e0f1990f6f08cb3814662f1c4575c6e5dae0f Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 23 Mar 2018 14:06:38 -0700 Subject: [PATCH] Removed the old example app from this repo. New one is found here: https://github.com/react-native-community/rncamera-example --- Example/.babelrc | 3 - Example/.buckconfig | 6 - Example/.flowconfig | 48 - Example/.gitattributes | 1 - Example/.gitignore | 53 - Example/.watchmanconfig | 1 - Example/Example.js | 215 - Example/__tests__/App.js | 12 - Example/android/app/BUCK | 65 - Example/android/app/build.gradle | 151 - Example/android/app/proguard-rules.pro | 70 - .../android/app/src/main/AndroidManifest.xml | 37 - .../main/java/com/example/MainActivity.java | 15 - .../java/com/example/MainApplication.java | 47 - .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3418 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2206 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 4842 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 7718 -> 0 bytes .../app/src/main/res/values/strings.xml | 3 - .../app/src/main/res/values/styles.xml | 8 - Example/android/build.gradle | 43 - Example/android/gradle.properties | 20 - .../android/gradle/wrapper/gradle-wrapper.jar | Bin 52266 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 - Example/android/gradlew | 164 - Example/android/gradlew.bat | 90 - Example/android/keystores/BUCK | 8 - .../keystores/debug.keystore.properties | 4 - Example/android/settings.gradle | 5 - Example/app.json | 4 - Example/assets/ic_camera_front_white.png | Bin 193 -> 0 bytes Example/assets/ic_camera_front_white@2x.png | Bin 317 -> 0 bytes Example/assets/ic_camera_front_white@3x.png | Bin 444 -> 0 bytes Example/assets/ic_camera_rear_white.png | Bin 164 -> 0 bytes Example/assets/ic_camera_rear_white@2x.png | Bin 266 -> 0 bytes Example/assets/ic_camera_rear_white@3x.png | Bin 377 -> 0 bytes Example/assets/ic_flash_auto_white.png | Bin 263 -> 0 bytes Example/assets/ic_flash_auto_white@2x.png | Bin 459 -> 0 bytes Example/assets/ic_flash_auto_white@3x.png | Bin 673 -> 0 bytes Example/assets/ic_flash_off_white.png | Bin 223 -> 0 bytes Example/assets/ic_flash_off_white@2x.png | Bin 345 -> 0 bytes Example/assets/ic_flash_off_white@3x.png | Bin 485 -> 0 bytes Example/assets/ic_flash_on_white.png | Bin 158 -> 0 bytes Example/assets/ic_flash_on_white@2x.png | Bin 239 -> 0 bytes Example/assets/ic_flash_on_white@3x.png | Bin 318 -> 0 bytes Example/assets/ic_photo_camera_36pt.png | Bin 351 -> 0 bytes Example/assets/ic_photo_camera_36pt@2x.png | Bin 643 -> 0 bytes Example/assets/ic_photo_camera_36pt@3x.png | Bin 941 -> 0 bytes Example/assets/ic_stop_36pt.png | Bin 91 -> 0 bytes Example/assets/ic_stop_36pt@2x.png | Bin 111 -> 0 bytes Example/assets/ic_stop_36pt@3x.png | Bin 117 -> 0 bytes Example/assets/ic_videocam_36pt.png | Bin 169 -> 0 bytes Example/assets/ic_videocam_36pt@2x.png | Bin 224 -> 0 bytes Example/assets/ic_videocam_36pt@3x.png | Bin 330 -> 0 bytes Example/index.js | 4 - Example/ios/Example-tvOS/Info.plist | 54 - Example/ios/Example-tvOSTests/Info.plist | 24 - Example/ios/Example.xcodeproj/project.pbxproj | 1416 ----- .../xcschemes/Example-tvOS.xcscheme | 129 - .../xcshareddata/xcschemes/Example.xcscheme | 129 - Example/ios/Example/AppDelegate.h | 16 - Example/ios/Example/AppDelegate.m | 37 - .../ios/Example/Base.lproj/LaunchScreen.xib | 42 - .../AppIcon.appiconset/Contents.json | 43 - .../ios/Example/Images.xcassets/Contents.json | 6 - Example/ios/Example/Info.plist | 63 - Example/ios/Example/main.m | 18 - Example/ios/ExampleTests/ExampleTests.m | 70 - Example/ios/ExampleTests/Info.plist | 24 - Example/package.json | 24 - Example/yarn.lock | 4622 ----------------- 71 files changed, 7799 deletions(-) delete mode 100644 Example/.babelrc delete mode 100644 Example/.buckconfig delete mode 100644 Example/.flowconfig delete mode 100644 Example/.gitattributes delete mode 100644 Example/.gitignore delete mode 100644 Example/.watchmanconfig delete mode 100644 Example/Example.js delete mode 100644 Example/__tests__/App.js delete mode 100644 Example/android/app/BUCK delete mode 100644 Example/android/app/build.gradle delete mode 100644 Example/android/app/proguard-rules.pro delete mode 100644 Example/android/app/src/main/AndroidManifest.xml delete mode 100644 Example/android/app/src/main/java/com/example/MainActivity.java delete mode 100644 Example/android/app/src/main/java/com/example/MainApplication.java delete mode 100644 Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 Example/android/app/src/main/res/values/strings.xml delete mode 100644 Example/android/app/src/main/res/values/styles.xml delete mode 100644 Example/android/build.gradle delete mode 100644 Example/android/gradle.properties delete mode 100644 Example/android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 Example/android/gradle/wrapper/gradle-wrapper.properties delete mode 100755 Example/android/gradlew delete mode 100644 Example/android/gradlew.bat delete mode 100644 Example/android/keystores/BUCK delete mode 100644 Example/android/keystores/debug.keystore.properties delete mode 100644 Example/android/settings.gradle delete mode 100644 Example/app.json delete mode 100644 Example/assets/ic_camera_front_white.png delete mode 100644 Example/assets/ic_camera_front_white@2x.png delete mode 100644 Example/assets/ic_camera_front_white@3x.png delete mode 100644 Example/assets/ic_camera_rear_white.png delete mode 100644 Example/assets/ic_camera_rear_white@2x.png delete mode 100644 Example/assets/ic_camera_rear_white@3x.png delete mode 100644 Example/assets/ic_flash_auto_white.png delete mode 100644 Example/assets/ic_flash_auto_white@2x.png delete mode 100644 Example/assets/ic_flash_auto_white@3x.png delete mode 100644 Example/assets/ic_flash_off_white.png delete mode 100644 Example/assets/ic_flash_off_white@2x.png delete mode 100644 Example/assets/ic_flash_off_white@3x.png delete mode 100644 Example/assets/ic_flash_on_white.png delete mode 100644 Example/assets/ic_flash_on_white@2x.png delete mode 100644 Example/assets/ic_flash_on_white@3x.png delete mode 100644 Example/assets/ic_photo_camera_36pt.png delete mode 100644 Example/assets/ic_photo_camera_36pt@2x.png delete mode 100644 Example/assets/ic_photo_camera_36pt@3x.png delete mode 100644 Example/assets/ic_stop_36pt.png delete mode 100644 Example/assets/ic_stop_36pt@2x.png delete mode 100644 Example/assets/ic_stop_36pt@3x.png delete mode 100644 Example/assets/ic_videocam_36pt.png delete mode 100644 Example/assets/ic_videocam_36pt@2x.png delete mode 100644 Example/assets/ic_videocam_36pt@3x.png delete mode 100644 Example/index.js delete mode 100644 Example/ios/Example-tvOS/Info.plist delete mode 100644 Example/ios/Example-tvOSTests/Info.plist delete mode 100644 Example/ios/Example.xcodeproj/project.pbxproj delete mode 100644 Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme delete mode 100644 Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme delete mode 100644 Example/ios/Example/AppDelegate.h delete mode 100644 Example/ios/Example/AppDelegate.m delete mode 100644 Example/ios/Example/Base.lproj/LaunchScreen.xib delete mode 100644 Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Example/ios/Example/Images.xcassets/Contents.json delete mode 100644 Example/ios/Example/Info.plist delete mode 100644 Example/ios/Example/main.m delete mode 100644 Example/ios/ExampleTests/ExampleTests.m delete mode 100644 Example/ios/ExampleTests/Info.plist delete mode 100644 Example/package.json delete mode 100644 Example/yarn.lock diff --git a/Example/.babelrc b/Example/.babelrc deleted file mode 100644 index a9ce136..0000000 --- a/Example/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["react-native"] -} diff --git a/Example/.buckconfig b/Example/.buckconfig deleted file mode 100644 index 934256c..0000000 --- a/Example/.buckconfig +++ /dev/null @@ -1,6 +0,0 @@ - -[android] - target = Google Inc.:Google APIs:23 - -[maven_repositories] - central = https://repo1.maven.org/maven2 diff --git a/Example/.flowconfig b/Example/.flowconfig deleted file mode 100644 index 2f13324..0000000 --- a/Example/.flowconfig +++ /dev/null @@ -1,48 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore "BUCK" generated dirs -/\.buckd/ - -; Ignore unexpected extra "@providesModule" -.*/node_modules/.*/node_modules/fbjs/.* - -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -.*/Libraries/react-native/React.js - -; Ignore polyfills -.*/Libraries/polyfills/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow/ - -[options] -emoji=true - -module.system=haste - -munge_underscores=true - -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState -suppress_type=$FixMe - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - -unsafe.enable_getters_and_setters=true - -[version] -^0.57.0 diff --git a/Example/.gitattributes b/Example/.gitattributes deleted file mode 100644 index d42ff18..0000000 --- a/Example/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.pbxproj -text diff --git a/Example/.gitignore b/Example/.gitignore deleted file mode 100644 index 0826423..0000000 --- a/Example/.gitignore +++ /dev/null @@ -1,53 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml - -# node.js -# -node_modules/ -npm-debug.log -yarn-error.log - -# BUCK -buck-out/ -\.buckd/ -*.keystore - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -*/fastlane/report.xml -*/fastlane/Preview.html -*/fastlane/screenshots diff --git a/Example/.watchmanconfig b/Example/.watchmanconfig deleted file mode 100644 index 9e26dfe..0000000 --- a/Example/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Example/Example.js b/Example/Example.js deleted file mode 100644 index 9ff7a7f..0000000 --- a/Example/Example.js +++ /dev/null @@ -1,215 +0,0 @@ -import React from 'react'; -import { Image, StatusBar, StyleSheet, TouchableOpacity, View } from 'react-native'; -import Camera from 'react-native-camera'; - -const styles = StyleSheet.create({ - container: { - flex: 1, - }, - preview: { - flex: 1, - justifyContent: 'flex-end', - alignItems: 'center' - }, - overlay: { - position: 'absolute', - padding: 16, - right: 0, - left: 0, - alignItems: 'center', - }, - topOverlay: { - top: 0, - flex: 1, - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - }, - bottomOverlay: { - bottom: 0, - backgroundColor: 'rgba(0,0,0,0.4)', - flexDirection: 'row', - justifyContent: 'center', - alignItems: 'center', - }, - captureButton: { - padding: 15, - backgroundColor: 'white', - borderRadius: 40, - }, - typeButton: { - padding: 5, - }, - flashButton: { - padding: 5, - }, - buttonsSpace: { - width: 10, - }, -}); - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.camera = null; - - this.state = { - camera: { - aspect: Camera.constants.Aspect.fill, - captureTarget: Camera.constants.CaptureTarget.cameraRoll, - type: Camera.constants.Type.back, - orientation: Camera.constants.Orientation.auto, - flashMode: Camera.constants.FlashMode.auto, - }, - isRecording: false, - }; - } - - takePicture = () => { - if (this.camera) { - this.camera - .capture() - .then(data => console.log(data)) - .catch(err => console.error(err)); - } - }; - - startRecording = () => { - if (this.camera) { - this.camera - .capture({ mode: Camera.constants.CaptureMode.video }) - .then(data => console.log(data)) - .catch(err => console.error(err)); - this.setState({ - isRecording: true, - }); - } - }; - - stopRecording = () => { - if (this.camera) { - this.camera.stopCapture(); - this.setState({ - isRecording: false, - }); - } - }; - - switchType = () => { - let newType; - const { back, front } = Camera.constants.Type; - - if (this.state.camera.type === back) { - newType = front; - } else if (this.state.camera.type === front) { - newType = back; - } - - this.setState({ - camera: { - ...this.state.camera, - type: newType, - }, - }); - }; - - get typeIcon() { - let icon; - const { back, front } = Camera.constants.Type; - - if (this.state.camera.type === back) { - icon = require('./assets/ic_camera_rear_white.png'); - } else if (this.state.camera.type === front) { - icon = require('./assets/ic_camera_front_white.png'); - } - - return icon; - } - - switchFlash = () => { - let newFlashMode; - const { auto, on, off } = Camera.constants.FlashMode; - - if (this.state.camera.flashMode === auto) { - newFlashMode = on; - } else if (this.state.camera.flashMode === on) { - newFlashMode = off; - } else if (this.state.camera.flashMode === off) { - newFlashMode = auto; - } - - this.setState({ - camera: { - ...this.state.camera, - flashMode: newFlashMode, - }, - }); - }; - - get flashIcon() { - let icon; - const { auto, on, off } = Camera.constants.FlashMode; - - if (this.state.camera.flashMode === auto) { - icon = require('./assets/ic_flash_auto_white.png'); - } else if (this.state.camera.flashMode === on) { - icon = require('./assets/ic_flash_on_white.png'); - } else if (this.state.camera.flashMode === off) { - icon = require('./assets/ic_flash_off_white.png'); - } - - return icon; - } - - render() { - return ( - -