Commit Graph

160 Commits

Author SHA1 Message Date
Nick Pomfret 98de15cf9a [android] add gps meta to android (#643)
* writing metadata.location (lat and lon coords only) to the exif data... and returning the internal url for the new image (which can be used in conjunction with the RN CameraRoll)

* just a tidy up to remove some duplication and fix some logging (no functional changes)

* oops, fix typo

* docs

* added mediaUri to ios so its the same as android
2017-03-23 08:41:01 -07:00
Nazar Yablonskiy efd5931fd8 updated Breaking Changes section of README.md 2017-03-07 08:11:59 +02:00
Douglas Duhaime da68ee86a1 let flexbox resize components (#620) 2017-03-06 10:33:16 -08:00
Nazar Yablonskiy 79ff4688ae upd readme 2017-02-27 21:27:06 +02:00
Mike Monteith c688c8344c Encourage use of newest version (0.6) (#601) 2017-02-15 10:28:59 -08:00
Andrew Blair 5e9e0edb79 Added important notes about iOS 10 privacy rules
about needing to define strings for `NSCameraUsageDescription` and `NSMicrophoneUsageDescription`
2017-02-06 16:38:18 -08:00
Alejandro Garcia 5ed6b81493 Updated README.md - added missing permission in android manifest (#567) 2017-01-25 11:58:46 -08:00
Derek Hsu c12fd726a3 Fix barcode type ‘code128’ typo (#563) 2017-01-22 23:20:39 -08:00
Zack Story fe43f554f1 Update README.md 2017-01-22 19:39:36 -08:00
Zack Story 3053f5cb43 Update README.md 2017-01-22 19:35:13 -08:00
Zack Story d116d52442 Update README.md 2017-01-06 12:06:02 -08:00
Zack Story 4b089ced6b Update README.md 2017-01-05 23:44:07 -08:00
Paul Ferrett 4babe6573c Fix typo in README.md (#546) 2017-01-05 23:22:18 -08:00
sunnylqm 536d39b33b barcode now supports android (#508) 2016-12-09 12:18:28 -05:00
Ron Heft fd61e506e5 Document other iOS authorization status methods (#427)
The API already exposes specific methods for checking camera and microphone access individually. These should be documented. Especially since calling `checkDeviceAuthorizationStatus` requests the microphone permission, which is undesirable in photo-only use cases.
2016-11-30 20:25:23 -05:00
Anton Shevchenko 9e06741e94 Include microphone permission key in Info.plist (#488)
* Include microphone permission key in Info.plist

Mention microphone permission (and what to add to `Info.plist) for iOS 10 and up.

* Update README.md
2016-11-28 20:15:42 -05:00
Loch Wansbrough 69d6b5acbf Update README.md 2016-11-23 12:59:36 -08:00
Locly 154cb7aa58 Added Camera.constants.CaptureQuality.preview for android to allow the outputted image to be exactly the same as the previewed image (#449) 2016-11-21 19:41:19 -05:00
Zack Story e4536fd896 Update README.md 2016-11-20 15:12:45 -08:00
James 6fe07c48ae Explicitly added instructions for the Camera Usage Description for iO… (#478)
* Explicitly added instructions for the Camera Usage Description for iOS 10

* Added NSPhotLib field as well
2016-11-18 17:42:03 -05:00
abrahambotros a2a6d028a4 Add 1080p, 720p, and 480p capture qualities. (#469)
* Add 1080p, 720p, and 480p capture qualities.

* Minor improvements for picture/video sizing.

- Minor refactoring for getting supported sizes (DRY).
- Add explicit pictureSize setting for 480p/720p/1080p in still/picture mode.

* Use util.Size objects for 480p/720p/1080p sizing.

- Note using Camera.Size objects would require a camera instance prior to creating the
  size objects, which would be manageable but not too clean.

* Remove 480p for iOS; 16:9/HD aspect ratio for Android 480p

- iOS only has a 640x480 480p-like AVCaptureSessionPreset, which is not the typical 16:9/HD aspect ratio
  desired. Removing this option as a result of this.
- Android 480p updated to use 16:9/HD aspect ratio.

* Add notes for (in)exact sizing for 1080p/720p/480p

* Re-add 480p on iOS, more notes on resolutions.

- Add notes on non-HD-aspect-ratio for iOS 480p.
- Add more explanation of variable resolution/sizes, especially for 480p on Android.

* Use custom Resolution class to hold 480p/720p/1080p resolution sizes

- Mistakenly used util.Size class before, which was not added until Android API level 21 (current
  min is 16).
2016-11-18 17:38:23 -05:00
Jonathan Chen adb26f4524 Default captureAudio to false (#420)
* Default captureAudio to false

Since default captureMode is a still picture, not video. 

This also works around some new iOS 10 permissions requiring notifying the user with a reason for using microphone (which is not good for the user experience if they're just taking a picture). Reference: https://github.com/lwansbrough/react-native-camera/issues/386#issuecomment-249007206

If you need video and sound, then explicitly pass it through as props in your Camera component.

* Update readme for default audio setting
2016-11-18 17:35:26 -05:00
abrahambotros b16ec4ab75 Minor Android MediaRecorder, sizing, and file improvements (#477)
Android MediaRecorder:
  - Most importantly, call Camera.unlock() before setting the camera on the
    MediaRecorder instance, and release() not just reset() when releasing the MediaRecorder
    instance!
  - Add comments and notes for preparing and releasing MediaRecorder instance.
  - Add onError callback for errors during recording session.

RCTCameraViewManager, RCTCamera, RCTCameraViewFinder, RCTCameraView:
  - Implement setCaptureMode, preparing camera based on captureMode. Currently, the only step that
    needs to be taken here is setting the recording hint for videos.
  - Handle setting _captureMode instance variable where applicable.

Sizing
  - Determine ViewFinder supported sizes based on actual captureMode (i.e., get supported picture
    sizes when in still capture mode, and get supported video sizes when in video capture mode).

Output files:
  - Get appropriate external storage public directory based on media type (image or video).
  - Minor variable renaming to indicate that both images or videos can be saved.

README:
  - Update captureTarget to indicate that cameraRoll is the actual default for both systems.
  - Small clarification for output data type for deprecated memory captureTarget output.
2016-11-17 22:25:51 -08:00
Livio Bieri fb3b12b4f1 README: Updated Requirements for iOS 10 (#445) 2016-10-12 20:35:13 -04:00
Gonzalo Aguirre b01c64e773 Mirror image for Android (#399)
* Add mirrorImage support for Android

* Release resources after mirroring

* Mirror image only for TYPE_FRONT

* Remove unnecessary annotation

* Document mirrorImage for Android

* Improved compression and error handling

* Add support for mirroring on Android back camera too
2016-09-13 09:48:48 -07:00
jacobSingh 2bbdf8ce91 Update README.md (#407) 2016-09-13 02:08:25 -07:00
David 3ff9a5852a Update Readme (#406)
for everyone that links it manually  - see: https://github.com/lwansbrough/react-native-camera/issues/164
2016-09-13 01:21:28 -07:00
Sergio Navarrete Suárez ae88ac7405 Updates README.md: Manual Android install (#385)
Changes MainActivity.java to MainApplication.java.

For people with little or no Java experience, it also ensures the list returned by getPackages() is separated by a coma.
2016-09-12 20:30:02 -07:00
Marc Johnson e326d51a53 Android support for recording video (#262)
* Initial commit with Android video support

* stopCapture now works

* Bug fixes and parameter enhancements.  README updated.

* Modified stopCapture parameter count to match iOS

* fixed promise bug on stopCapture

* Update RCTCameraModule.java

In Android preview and recording sizes are different, which can cause an error.  This fix detects the difference and chooses a recording resolution that matches.

* Update RCTCameraModule.java

* Update RCTCamera.java

Creating video functions in style/convention of existing

* Update RCTCameraModule.java

Use new functions for adjusting video capture size and quality

* Update RCTCameraModule.java

Fixes issue where file not video playable (readable) on older devices

* Update AndroidManifest.xml

Since we're reading and writing video and pictures, need permissions for it.

* Fixed upside down camera (on some platforms), and misc bugs and crashes

* Added camera-roll and capture to memory support, new options, and support for duration, filesize, and metadata

* To make merge nicer, temporarily reverting "Added camera-roll and capture to memory support, new options, and support for duration, filesize, and metadata"

This reverts commit 9ea1ad409c7e6121cf0197172e752b7523d4b092.

* Fixed merge & brought back all improvements from 9ea1ad4

* Fixed logic for video -> camera roll

* Updates

* Uncommenting setProfile

* Fix support for React Native 0.25

* Renamed Camera to index

* * Fix after merge android recording

* * Fixed android camera roll file saving
* Added recording to example

* * Android promise rejections with exceptions
* Fixed preview, video and photo sizes
* Android recording result in new, javascript object, format

* * Removed example.index.android.js as there is Example project

* * Readme for example

* don't force a specific codec

* always use cache dir

* * Using MediaScannerConnection instead of ACTION_MEDIA_SCANNER_SCAN_FILE intent

* * As described in https://github.com/lwansbrough/react-native-camera/pull/262#issuecomment-239622268:
- fixed video the wrong direction and recoder start fail at "low,medium" on the nexus 5 x
2016-08-27 21:49:46 -04:00
Jason Marshall 1032370749 rnpm is part of react-native now (#355) 2016-08-01 18:19:41 -07:00
Jonathan Stanton 0d32769dac Add podspec (#329)
* Add podspec file

* Add instructions for CocoaPods
2016-07-02 12:01:43 -07:00
Nicolas Charpentier e1f04e082a Merge pull request #304 from charpeni/example
Add example
2016-06-14 09:16:25 -04:00
Darryl Blake b2d9fa904b React, and Component should now be imported from 'react', not 'react-native'. (#297) 2016-06-01 10:30:52 -07:00
Nicolas Charpentier 1024c6bed5 Add example 2016-05-30 11:19:43 -04:00
Zack Story 347d04e843 Update README.md 2016-04-27 20:37:58 -07:00
Zack Story 8d42cd4dde Update README.md 2016-04-27 20:37:48 -07:00
Zack Story c3ca7cbb03 Merge pull request #270 from lwansbrough/v1
v1 Updates
2016-04-27 20:34:46 -07:00
Jason Brown 75dff8bff1 Add photo documentation (#269) 2016-04-23 12:59:17 -07:00
Zack Story fae43dd698
[readme] notes for barCodeTypes and playSoundOnCapture 2016-04-23 12:44:41 -07:00
Kyle Corbitt 0c789b8da0
capture returns metadata 2016-04-23 12:44:39 -07:00
cdimascio a6785cfa46
play shutter click sound on capture (android)
* play shutter click sound on capture (android)

* Add Property playSoundOnCapture to enable whether the default shutter sound is played on capture (Android)
2016-04-10 18:13:01 -07:00
Zack Story 9ac0247f94 Merge pull request #235 from cdimascio/pr/hasFlashAndroid
Add hasFlash support for Android
2016-04-02 19:14:47 -07:00
Dan Horrigan 1406e0630f Add the `mirrorImage` prop will will mirror the resulting image when true. 2016-03-28 14:40:07 -04:00
Carmine DiMascio e20902933d Add hasFlash support for Android 2016-03-26 20:27:40 -04:00
Radu Popovici 5659cc7809 add captureQuality option 2016-03-20 21:31:23 +02:00
Loch Wansbrough 8f2fa1e375 Merge pull request #214 from rt2zz/v1doc
add v1/legacy instructions
2016-03-08 10:22:47 -08:00
sunnylqm bdcd80f35b Aspect.Fill -> Aspect.fill 2016-03-03 10:03:51 +08:00
Zack 1ac4f82d20 add v1/legacy instructions 2016-02-24 10:59:59 -08:00
Loch Wansbrough d786581d08 Merge pull request #196 from brunobar79/more-barcode-types
Add support for ITF14 and interleaved 2 of 5 barcode types
2016-02-13 15:44:50 -08:00
Bruno Barbieri 9e83ddbc59 update docs 2016-02-13 00:59:29 -05:00
Kyle Corbitt 61b950403d add keepAwake prop 2016-02-08 12:22:37 +00:00
Loch Wansbrough 1feb274458 Updated npm instructions in README 2016-02-03 19:18:00 -08:00
Loch Wansbrough ab7751ea44 Merge pull request #179 from zackify/patch-1
fixed android path
2016-02-03 11:39:56 -08:00
Loch Wansbrough 93b0d06613 Update README.md 2016-02-03 08:57:25 -08:00
Zach Silveira dcee7836d1 fixed android path 2016-02-02 21:04:05 -05:00
Lochlan Wansbrough f5ab0c8432 - Updated Read Me with correct Android install information.
- Fixed promise error during android deployment
2016-01-31 20:56:38 -08:00
Lochlan Wansbrough edf0736f92 - Updated example
- ES6 stuff
2016-01-31 20:47:59 -08:00
Lochlan Wansbrough 580d11bba0 Documentation update 2016-01-31 20:15:00 -08:00
Lochlan Wansbrough 8f9fd98496 Updated docs. 2016-01-31 19:46:33 -08:00
Loch Wansbrough 1b5de73fe9 Merge pull request #170 from corbt/promises
Switch from callbacks to promises
2016-01-31 18:16:07 -08:00
Kyle Corbitt 45c26869a4 switch from callbacks to promises 2016-01-28 12:13:01 +00:00
Christopher Dro d0355fe2e6 [Docs] Add capture target temp to readme 2016-01-27 09:55:26 -08:00
Loch Wansbrough b26f9a92d4 Merge pull request #161 from farmisen/docu
Adding instructions for getting started on android.
2016-01-25 11:15:05 -08:00
Fabrice Armisen 37dc9af97a Removing the "ios only" mention 2016-01-25 10:33:10 -08:00
Fabrice Armisen c8966280b1 Adding Android instructions to get started 2016-01-24 19:36:29 -08:00
Loch Wansbrough e68dd966ef Added Gitter
Fixes #148
2016-01-12 15:01:05 -08:00
Brad Bumbalough 8e1ae7c9a4 Corrected docs heading 2015-12-22 16:47:03 -05:00
Brad Bumbalough 4e34fff32e Added method to Camera to expose the CameraManager checkDeviceAuthorizationStatus() method. Updated docs. 2015-12-22 16:45:17 -05:00
Loch Wansbrough 55fc97193c Update README.md 2015-12-11 09:00:42 -08:00
Loch Wansbrough 84f4db97a6 Update README.md 2015-11-05 11:25:27 -08:00
Zachary Lee 70cd5cdc16 Added a step in the 'Getting Started' section
Added the location in which Header Search Paths can be found to make it easier for people that are unfamiliar with XCode to find Header Search Paths.
2015-11-01 16:46:17 -08:00
Loch Wansbrough beff2e5191 Update README.md 2015-09-22 19:59:10 -07:00
Lochlan Wansbrough 3ea32e5c6e Merge branch 'master' into unknownexception-feature/tap-to-focus 2015-09-22 19:41:40 -07:00
Lochlan Wansbrough 1c97947d23 Merge branch 'feature/tap-to-focus' of git://github.com/unknownexception/react-native-camera into unknownexception-feature/tap-to-focus
# Conflicts:
#	README.md
#	index.ios.js
2015-09-22 19:41:06 -07:00
Quinton Aiken f7f650c77f Update Header Search File Paths
Update Header Search File Paths to Reflect New Directories
2015-09-22 11:22:45 -07:00
Dmitriy Loktev 2f045eaece Update Readme.md 2015-08-29 14:29:10 +06:00
Dmitriy Loktev 4d5a8ba16b Update to react-native@0.10, add APIs to Readme 2015-08-29 14:24:05 +06:00
Jehan 00a2b3adaf Added docs for location and rotation options 2015-08-02 09:09:37 -07:00
Jed Watson beed5e27e7 Adding barcode types to Readme 2015-07-27 05:32:42 +10:00
Lochlan Wansbrough 8b12a36106 Minor readme updates 2015-07-10 17:07:44 -07:00
Lochlan Wansbrough 8eb6e9e7dc Version 0.3 introduces a number of new features and improvements. Most notably:
- Video capture is now supported (@machard)
- Torch mode is now supported (@andreaskeller)
- Device no longer becomes hot when camera module is included
- Location data is now supported (@jtremback)
- Dummy image is captured while using the simulator (@jtremback)
- Image orientation has been fixed (@jtremback)
- Bar code type is now sent in the scan event

Additionally, the following features have been deprecated or removed:
- "memory" captureTarget is now deprecated and will be removed in a future release. The default is now "cameraRoll"
- The deprecated method of setting camera settings has been removed

Please report any problems you encounter.
2015-07-10 17:02:58 -07:00
Lochlan Wansbrough 65b5033596 I believe this will fix issues #52 and #58. There are a lot of changes here due to a whitespace formatting change. 2015-07-09 20:11:50 -07:00
Andreas Keller 6d3af38178 Adds torchMode property 2015-06-15 20:58:36 +02:00
guodong 3dd33d842e Add flash mode setting 2015-05-31 00:36:55 +08:00
Lochlan Wansbrough 57a32eb672 Fixes #25 2015-05-05 02:11:10 -04:00
Lochlan Wansbrough 7136aaee25 - Adds auto orientation adjustment
- Adds deprecation notice for old prop values
2015-05-01 14:33:23 -07:00
Lochlan Wansbrough 6dfcfa134e Improvements to PRs and working towards v2. WIP. 2015-05-01 01:16:32 -07:00
Lochlan Wansbrough fdd947159e Fixes #8 2015-04-24 11:56:16 -07:00
Lochlan Wansbrough b29198875d Added GIF 2015-04-24 10:52:00 -07:00
Lochlan Wansbrough 60fe613bd1 Added QR code reader functionality 2015-04-19 15:53:30 -07:00
Lochlan Wansbrough 6d7d360f18 Contains fixes for the viewfinder. 2015-04-16 17:16:35 -07:00
Lochlan Wansbrough 488e5327f7 Updates for React Native 0.3.11 updates. Major breaking changes here. Emphasis on the breaking. 2015-04-10 19:56:30 -07:00
Lochlan Wansbrough a57508a2c3 Crash issue acknowledgement 2015-04-08 22:06:00 -07:00
Lochlan Wansbrough 75129b54d7 Still image capture now works correctly! 2015-04-08 13:51:31 -07:00
rojotek 44da396efe Update README.md
minor typo fix.
2015-04-08 15:41:00 +10:00
Loch Wansbrough fbd99270c7 Update README.md
Added known issues + todo
2015-04-04 00:27:56 -07:00
scottdixon 568e31e5d9 Updated README: included TouchableHighlight component in example. Clarified example setup 2015-04-03 15:59:25 -07:00
Lochlan Wansbrough 1d11dfe010 - Enables addition of subviews inside the camera layout (this will make it easier to add overlays, buttons, etc.)
- Got further along with image capture. Only captures the first(?) frame of the output from when the camera starts, not the frame at the time the picture is taken... Let me know if you know how to fix this @lwansbrough on twitter.
2015-04-02 18:07:22 -07:00
Loch Wansbrough 4ffe6b8218 Update README.md 2015-04-02 02:51:32 -07:00
Lochlan Wansbrough 20be488fa8 Added support for camera switching and basic image capturing! 2015-04-02 02:40:03 -07:00