Commit Graph

220 Commits

Author SHA1 Message Date
Darkmyr
4a89a1f18c feat: do not crash on devices without flash hardware (#2108)
* Support cameras without flash hardware

* lint
2019-02-15 09:02:45 +01:00
Frieder Bluemle
b9f7d772b2 fix: remove executable bit from regular files (#2103) [skip release] [skip ci] 2019-02-12 10:46:51 +01:00
Laurin Quast
22533ed8e8
feat: allow camera scene when audio permissions are denied (#2048), Fixes #2047, Fixes #2051 2019-01-18 15:58:48 +01:00
Andrew Schenk
d93a6c7e11 feat(android): add videoBitrate option for recordAsync (#2055) [skip release] 2019-01-18 15:48:42 +01:00
Matt Oakes
f7fb3e361d fix(android): use the correct camera orientation to fix image detection (#2050), Fixes #1714 2019-01-18 10:30:35 +01:00
Michał Pierzchała
5695f5d066 fix(android): prevent shutting down camera when re-mounting children (#1995)
* fix(android): prevent shutting down camera when re-mounting children

* fix: render children outside of native component
2019-01-08 08:48:54 -02:00
Laurin Quast
513bfe860b fix(android): use device orientation for images/videos instead of display orientation (#1992)
* fix(android): use device orientation for images/videos instead of display orientation

* fix(android): landscape rotation
2018-12-13 18:16:56 -02:00
Stanyslav Yadykin
cc8338565b Android rotated barcodes fix (#1994) 2018-12-13 18:16:46 -02:00
Laurin Quast
401c485db3
feat(rn-camera): deviceOrientation, videoOrientation, pictureOrientation
* feat(rn-camera): add deviceOrientation and videoOrientation to record response.

* feat(rn-camera): add deviceOrientation and pictureOrientation to take-picture-response

* fix(rn-camera): unify orientation handling for recording and takeing picture

* fix(types): adjust typescript types

* docs(rn-camra): document new properties

* fix(android): respect actual boolean value instead of only checking if it is present.

* feat(android): implement orientation prop for takePictureAsync

* feat(android): implement orientation prop for recordVideoAsync

* docs(rn-camera): adjust documentation

* fix(types): unmark properties as ios only

* fix(android): use constants
2018-12-12 15:04:08 +01:00
SimonErm
71b10c1ac8 fix(android): stop preview if pauseAfterCapture is set to true (#1933)
Fixes #1930
2018-11-20 13:29:45 +01:00
Simon Ermler
09018bbed2 use correct options key 2018-11-19 14:06:52 +01:00
Simon Ermler
6a1d8e3733 call start() at the end of setUsingCamera2Api() 2018-11-19 14:06:27 +01:00
Laurin Quast
1369aff3e7
fix(barcode): resolve crash when barcode does not include raw bytes (#1916) 2018-11-12 11:20:56 +01:00
Simon Ermler
a78ddc4870 add missing nullpointer check 2018-11-08 22:18:55 +01:00
Cosmo Wolfe
d69d28b400 feat(qr-code): return raw barcode data if available (#1904) 2018-11-07 08:53:56 +01:00
Ruben Maher
f6f9f2916d feat: add property pauseAfterCapture to takePictureAsync (#1641) 2018-11-06 13:18:48 +01:00
Robert van Kints
7ee140bbdc feat(android): add inverted google vision barcode scanning (#1896) 2018-11-01 22:27:23 +01:00
alastorohlin
2932f5addf Fix to critical issue "Could not find intellij-core.jar" (#1885)
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-camera'.
> Could not resolve all artifacts for configuration ':react-native-camera:classpath'.
   > Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar
2018-10-24 17:55:10 -03:00
Rubén Sospedra
9261524609 fix: Do not rely in to jcenter but google (#1874) 2018-10-23 07:12:33 -03:00
Raphael Hovsepyan
aea0db22f7 Added origin key for result points and added camera width and height (#1824) 2018-10-19 09:31:01 -03:00
Ivan Polomani
8de827e6c2 fix: Error retrieving camcorder profile params (#1835)
I got this error when I call `recordAsync(...)` with `quality: RNCamera.Constants.VideoQuality['480p']` on Samsung Galaxy Tab S 10.5.
```
Error: Error retrieving camcorder profile params
    at createErrorFromErrorData (NativeModules.js:123)
    at NativeModules.js:80
    at MessageQueue.__invokeCallback (MessageQueue.js:400)
    at MessageQueue.js:139
    at MessageQueue.__guardSafe (MessageQueue.js:316)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:138)
```
It happens because there is no check if device actually supports given quality.
To make the `CamcorderProfile.get(quality)` call safe we need to check if there is appropriate CamcorderProfile by calling `CamcorderProfile.hasProfile(quality))`.

This PR fixes that issue.
2018-10-04 14:55:59 -03:00
Laurin Quast
0f697d0703
Merge pull request #1715 from PixilatedPhoto/master
Added onPictureTaken event emitter to RNCamera in Android
2018-09-24 22:58:41 +02:00
Tony Mack
0fea2e21cc Update build.gradle (#1802)
googlePlayServicesVersion update - this is making it hard to include other libraries that need an updated google-services version
2018-09-24 11:30:06 -03:00
Mark Vayngrib
d4b4ee1168 fix: android base64 string format for consistency with ios (#1776) 2018-09-04 05:31:08 -03:00
Aamir
652ea5f171 Adding 'doNotSave' option to skip saving (#1770)
* Add 'doNotSave' flag to android

Added check for 'doNotSave' flag to prevent saving picture to cache

* Update RNCameraManager to check for 'doNotSave'

Updated RNCameraManager to avoid saving to disk when 'doNotSave' set to true

* Update RNCamera to check for 'doNotSave'

Updated RNCameraManager to avoid saving to disk when 'doNotSave' provided and set to true

* Added notes for doNotSave

Added documentation for using doNotSave option
2018-09-03 10:11:43 -03:00
Paul V Puey
1c9e83dc94 Bump gradle tools to 3.0.1 (#1759) 2018-08-24 10:13:39 -03:00
Josh Sacks
68bf3d03ed fixed variable name for event picture taken 2018-07-30 13:39:10 -04:00
Josh Sacks
b8132bf8ab added Android event to emit when picture is taken 2018-07-30 12:33:30 -04:00
davidpricedev
6edd31682a Merge remote-tracking branch 'upstream/master' into 1255-FixInvalidImageSize 2018-07-20 14:02:34 -05:00
SimonErm
074963544a add missing retention annotation (#1702) 2018-07-19 16:07:55 -03:00
João Guilherme Fidelis
63c62b0fb1
Merge pull request #1690 from CptFabulouso/patch-1
fix #1373 Promise does not return
2018-07-18 10:26:30 -03:00
Reza Ghorbani
cb05f6a503 Refactor build.gradle (#1661) 2018-07-13 16:19:25 -03:00
CptFabulouso
538f9faf38
Update RNCameraView.java
fix ResolveTakenPictureAsyncTask function arguments
2018-07-11 11:10:38 +02:00
CptFabulouso
0577e99504
fix Promise does not return #1373
In my case it happened because AsyncTask in ResolveTakenPictureAsyncTask.java did not run, following this solution to issue https://stackoverflow.com/questions/26890618/asynctask-doinbackground-not-called-after-calling-method-onpreexecute/26890971#26890971 fixed my problem
2018-07-11 10:58:34 +02:00
davidpricedev
5489c7da94 heads off an array length issue 2018-07-10 17:02:04 -05:00
Simon Ermler
56c807bdeb rename variables and add check 2018-06-30 17:00:35 +02:00
SimonErm
236758147d move rotation to BarCodeScannerAsyncTask (#1667) 2018-06-29 11:43:21 -03:00
Simon Ermler
5b97763e49 add null check 2018-06-28 23:53:55 +02:00
HTALA
cb62502a47 Update Camera1.java (#1657)
* Update Camera1.java

Check setPictureSize for null to prevent an exception

* Fixed ba spell
2018-06-22 08:42:21 -03:00
Joe Ridenour
aca37d30e5 Continued Recording
- Updated RNCamera.js to allow for path in recording options
- Updated RNCamera.m to check for new `path` key in options
- Updated RNCameraView.java to check for `path` property to use
- Updated RNCamera.md to reflect new option
2018-06-19 09:04:42 -05:00
Symous
4b91f1b369
update zxing lib version
zxing 3.2.1 perform so slow in Android 5.1 to scan a qrcode,update to 3.3.0 fix this issue
2018-06-13 09:07:45 +08:00
Slavik
4fdd548611 [BUG, ANDROID] width prop not works correctly when fixOrientation is enabled (#1629)
* add scan support for landscape mode

* refactoring

* fix errors

* fix rotation

* add landscape orientation support

* fix exception

* freeze preview image

From PR https://github.com/lwansbrough/react-native-camera/pull/919

* fix width prop
2018-06-11 18:00:46 -03:00
Joao Fidelis
ad87c8e342 fix(picture-size): create None default value 2018-06-07 17:04:32 -03:00
Joao Fidelis
497a703964 feat(preview): add android code 2018-05-31 14:27:30 -03:00
Slavik
60b9ef1b84 Bug/save to capture when app goes on pause (#1578)
* add scan support for landscape mode

* refactoring

* fix errors

* fix rotation

* add landscape orientation support

* fix exception

* freeze preview image

From PR https://github.com/lwansbrough/react-native-camera/pull/919

* fix bug on android when user take photo and press home button immediately - after that camera not works
2018-05-22 17:38:42 +01:00
Sibelius Seraphini
ad840b30a0
Revert "Fix runtime error missing facebook infer annotation" 2018-05-21 17:47:32 -03:00
Mircea Nistor
269418c126
reenable camera on android emulator 2018-05-18 15:59:03 +03:00
Ville Ahti
6ce014d3ca Android: Fix java.lang.ArrayIndexOutOfBoundsException with image rotation 2018-05-17 14:33:49 +03:00
Karen
09f11ce7c4 Fix run time error missing facebook infer annotation 2018-05-14 22:14:06 -07:00
Victor Powell
f01ba34aaf Add missing infer annotation dependency. 2018-04-25 22:08:06 -07:00