Commit Graph

69 Commits

Author SHA1 Message Date
dependabot[bot]
90ec544cd2
chore(deps): bump logkitty in /examples/advanced/advanced (#2976)
Bumps [logkitty](https://github.com/zamotany/logkitty) from 0.6.1 to 0.7.1.
- [Release notes](https://github.com/zamotany/logkitty/releases)
- [Commits](https://github.com/zamotany/logkitty/compare/v0.6.1...v0.7.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-18 07:55:25 -03:00
dependabot[bot]
bde54e0559
chore(deps): bump handlebars in /examples/advanced/advanced (#2968)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.5.2 to 4.7.6.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.5.2...v4.7.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-08 14:28:42 -03:00
Sibelius Seraphini
1d876ef5eb
feat(upgrade): upgrade deps (#2967)
* feat(upgrade): upgrade deps

* feat(key): add missing debug keystore
2020-09-08 14:28:20 -03:00
dependabot[bot]
27dbe43ad3
chore(deps): bump @hapi/hoek in /examples/advanced/advanced (#2965)
Bumps [@hapi/hoek](https://github.com/hapijs/hoek) from 8.5.0 to 8.5.1.
- [Release notes](https://github.com/hapijs/hoek/releases)
- [Commits](https://github.com/hapijs/hoek/compare/v8.5.0...v8.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-08 09:49:11 -03:00
dependabot[bot]
0d90e84848
chore(deps): bump lodash from 4.17.15 to 4.17.19 in /examples/tests (#2902)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 12:00:46 -03:00
dependabot[bot]
e78242b038
chore(deps): bump lodash from 4.17.15 to 4.17.19 in /examples/mlkit (#2900)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 12:00:20 -03:00
dependabot[bot]
2d7985a46f
chore(deps): bump lodash in /examples/advanced/advanced (#2903)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 11:59:49 -03:00
dependabot[bot]
f3d6d7db19
chore(deps): bump lodash from 4.17.14 to 4.17.19 in /examples/basic (#2899)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.14 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.14...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 11:59:34 -03:00
René Fischer
e11918ccf7 refactor: removed duplicated check for custom white balance 2020-06-10 09:26:01 +02:00
René Fischer
bb774ead9b
Update examples/advanced/advanced/src/screens/Camera.js
Co-authored-by: Renato Benkendorf <51369951+renatobenks@users.noreply.github.com>
2020-06-10 09:15:15 +02:00
René Fischer
945e97a042
Update examples/advanced/advanced/src/screens/Camera.js
Co-authored-by: Renato Benkendorf <51369951+renatobenks@users.noreply.github.com>
2020-06-10 09:15:01 +02:00
René Fischer
042880a584
Update examples/advanced/advanced/src/screens/Camera.js
Co-authored-by: Renato Benkendorf <51369951+renatobenks@users.noreply.github.com>
2020-06-10 09:13:52 +02:00
René Fischer
134173f938 feat(ios): enhanced advanced example project
- added the custom white balance feature (#2774) to the advanced example project
2020-06-09 09:15:51 +02:00
Renato Benkendorf
20712367d8 fix(mlkit example): fixes the bad uses of googlevision barcode mode 2020-06-05 02:23:17 -03:00
Manish Kumar
fa61fce613
feat(ios): Add ability to scan inverted-color barcodes on iOS using Google Vision (#2851)
* Add required plumbing for supporiting inverted colors

* Update package.json

* Update package.json

* Update RNCamera.js

* Update package.json

* Update RNCameraManager.m

* Read barcode detection mode

* Update package.json

* Declare invertImageData as a property

* Access the property correctly

* Refer to the property correctly

* Update RNCamera.m

* Update RNCamera.md

* Set default scan mode to Alternate

* Update package.json

* Set the default barcode detection mode to normal

* Update package.json

* Make the property type consistent

* Update RNCamera.h

* Update package.json

* Rename variables for readability

* Update package.json

* Add barcode mode usage

* Revert version update

Co-authored-by: Manish Kumar <mkumar@acvauctions.com>
2020-06-04 12:17:51 -03:00
Renato Benkendorf
9463bbc77a
Merge pull request #2746 from react-native-community/dependabot/npm_and_yarn/examples/advanced/advanced/acorn-5.7.4
chore(deps): bump acorn from 5.7.3 to 5.7.4 in /examples/advanced/advanced
2020-06-04 02:01:45 -03:00
dependabot[bot]
9478d158d0
chore(deps): bump acorn in /examples/advanced/advanced
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-04 04:51:06 +00:00
dependabot[bot]
de1d7762eb
chore(deps): bump acorn from 5.7.3 to 5.7.4 in /examples/mlkit
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-04 04:50:59 +00:00
Renato Benkendorf
0f4107e729
Merge pull request #2743 from react-native-community/dependabot/npm_and_yarn/examples/basic/acorn-5.7.4
chore(deps): bump acorn from 5.7.3 to 5.7.4 in /examples/basic
2020-06-04 01:50:01 -03:00
SimonErm
dc4f65702f
feat(touch): Feature/add on tap events (#2827)
* add TouchEvent on android

* add GestureHandler to detect touches on android

* add property to enable touchDetector on android

* add onTouch event to ios

* add GestureRecognizer to ios

* add onTouch property and js setup

* add missing semicolons

* fix literal notation

* add missing ":"

* fix copy-paste error (wrong var-name)

* pass the native event to the onTouch callback

* replace : with ;

* add onTouch type defs

* add documentation for onTouch property

* scale postion before emitting since the event coordinates are raw pixels

* migrate advanced example to native pinch zoom and onTouch

* split onTouch property into onTap and onDoubleTap
2020-05-12 17:56:42 -03:00
MateusAndrade
d49643813b fix: adding downloadDependencies task to android projects 2020-05-10 23:30:17 -03:00
Frieder Bluemle
ce791350a4
feat(android): Update Gradle Wrapper and plugin, fix files (#2818)
* Update yarn.lock

* Remove executable bit from non-executable files

* Update Gradle Wrapper to 5.6.4

* Update Android Gradle plugin to 3.6.3
2020-05-05 16:01:20 -03:00
Kevin Sullivan
868d0fb828 test: fix broken tests 2020-04-18 10:00:38 -07:00
Kevin Sullivan
7b3c542b14 chore: remove unused files 2020-04-18 07:13:04 -07:00
Kevin Sullivan
3e94912fec
test: add more on-device tests (#2795) 2020-04-18 09:52:33 -03:00
Kevin Sullivan
cb79f53adc
feat(test): add on-device tests (#2792)
* test: add on-device tests

* test: add photos/videos tests
2020-04-14 20:02:17 -03:00
fabriziobertoglio1987
9c18c25f19
feat(example): Fix basic example bugs (#2751)
* feat(example): adding sound permissions to android example

* feat(example): fix basic example runtime error
2020-04-05 11:53:51 -03:00
fabriziobertoglio1987
1f29ffb023 feat(example): fix circleci error 2020-03-20 19:29:52 +01:00
fabriziobertoglio1987
8e4d36aa14 feat(example): remove rectOfInterest example 2020-03-19 19:05:58 +01:00
dependabot[bot]
9f2796decf
chore(deps): bump acorn from 5.7.3 to 5.7.4 in /examples/basic
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-14 03:55:45 +00:00
Mateus Andrade
43a7323f83
Merge pull request #2719 from bqwang91/master
Android - Limiting Scanning Area using rectOfInterest
2020-03-13 09:39:55 -03:00
fabriziobertoglio1987
4522841f8a fix(android): fix bug Duplicate module rn
fixing bug Duplicate module react-native
when running the mlkit and basic examples

1) adding metro.config.js to examples/basic and
examples/mlkit

2) adding new RegExp in blacklist to ignore the
advanced/node_modules/react-native/.* files
2020-03-10 10:12:11 +01:00
James Wang
583507f223 update cam view height 2020-02-29 20:33:17 +11:00
James Wang
3f801ee11c add example 2020-02-29 17:42:35 +11:00
cristianoccazinsp
c7e92b29c8
feature(record): On recording start and end events (#2702)
* This update tries to improve audio recording interruptions on iOS due to phone calls or background music.

- Use a more generic event to handle session interruptions. This removes the need to listen to foreground/background events, and stopping the session this way was actually redundant/wrong (see https://forums.developer.apple.com/thread/61406). This also makes session stopping detection more reliable (calls, suspension due to a call or notification, etc., which would previously not set the recording interrupted flag on every case)

From the above docs: "No, incorrect. You _never_ need to stop your capture session. The capture session automatically stops itself when your app goes to the background and resumes itself when you come back to the foreground."

- Allow for `captureAudio` updates to also update the audio connections internally so the prop can be correctly updated on the fly without remounting.

- add onAudioInterrupted and onAudioConnected events so the UI can handle scenarios where audio is wanted but not available. This should also help in keeping the preview active even if audio is interrupted and we have captureAudio={true}. Lastly, it can be used to detect if we can record audio or not due to the dummy implementation of the audio permission on iOS always returning true.

- check, activate, and release audio sessions (if captureAudio) so we can detect early if audio is available before attempting to connect the input. This will also allow us to detect if we can record even if there was already a call before opening the camera.

- use proper observer for session error instead of of the strong self block. No benefit, but makes code more readable and allows access to instance variables

- getDeviceOrientationWithBlock might fire more than once under some circumstances, ending up taking a picture or video twice. Add a lock and additional check to prevent this.

* no need for change check,

* do not resume audio if we were hinted not to (e.g., music playback happening)

* Move heavy work to a dedicated background thread. Improves camera initial loading and resumes from background.

Details:

- Use a HandlerThread to delegate heavy tasks to background. The thread is managed by the view, and passed down to the implementation in case it also needs to use it. The view will fire start calls and other possibly heavy operations in this thread to avoid ANRs. Some code sent to this thread:
    - start calls: start is extremely heavy and will cause ANRs on some devices, especially when coming back from background
    - Camera1: some preset changes fire a stop/start sequence. These will now happen in the background thread
    - take picture and start recording (from view class) will also start in this thread

- Add some extra null checks

- View was not properly cleaning up itself on destroy (host destroy event was never fired)

* Fix for a possible crash when changing devices and changing focus. If the new device resets the focus, "defocusing" might not be possible if the new device does not support auto focus. For this reason, we need to do a different cleanup on the focus and exposed flags and events.

* start session here also on session queue.

* check for session running before trying to record or capture.
This should fix a possible race condition where both the session start call happens at the same time as the record call

* set preview orientation also in session queue

* no need to set orientation on constructor, and set it on session queue to prevent race conditions

* move device init and checks also to session queue. This prevents possible double initializations.

* catch possible errors when starting camera preview. This might still randomly fail on some devices for some reason.

* delay capture in progress until we have resumed/paused preview.

* do not crash the app if set texture setup failed

* more synchronized checks to prevent crashes due to concurrent camera updates

* remove unused imports

* Handle audio interruption in session queue. This prevents the session isRunning flag from getting corrupted due to concurrent updates to the session.

* Fix possible crash when attempting to retrieve camera parameters.

* Preserve exif/metadata on photo capture. Add a few comments to each step of the capture process

* orientation must be fixed before mirroring

* x/y dimensions are redundantly updated (storing the image sets them automatically). However, orientation must be reset on any image change since the final stored image is automatically rotated when it is modified in place.

* revert mirrorImage order, has to be first since forceUpOrientation adjusts the image afterwards.

* Minor change: also implement `onPictureTaken` for iOS in case anyone needs the early event.

* - Improve Android code so skipProcessing is not needed, the code is more in line with iOS, and is "fast" by default. This means that skipProcessing is no longer needed (nor used), and adding additional options will "slow down" the capture as expected, rather than having always a lot of processing. This shouldn't be a breaking change.

- document the writeExif option, and implement it for iOS as well.

* This is a fix for events possibly being fired not on the main thread, which could cause the whole app to freeze.

* Fire events on the right thread. No need to use UI thread, and fix the still works

* Release CF object which could cause a memleak

* Fix Objects.equals that is only available after API 19

* allow for audio session to be kept even after unmounts

* readme typo

* readme typo

* Make camera ready events to fire also on camera/device change to be consistent with Android. Fire unmount error when session or device fails to start.

* update example app to properly use camera ready event

* Make camera ready events to fire also on camera/device change to be consistent with Android. Fire unmount error when session or device fails to start. Update advanced example app to use camera ready event instead.

* Android crash fixes. Make sure no unsupported aspect ratio is used, and do not crash when there are no cameras available.

* stop/release camera in non-UI thread so we prevent ANRs and UI freezing.

Some phones may take up to a second to release the camera and preview.

* move codec, max duration, and max file size settings to the session queue.

This might prevent a race condition when changing presets/quality.

* android crash fix

* Add onRecordingStart and onRecordingEnd events

* fix for surface destroy and resume events.

* add missing types

* fix for surface destroy and resume events.

* add missing types

Co-authored-by: Cristiano Coelho <cristianocca@hotmail.com>
2020-02-13 23:21:59 -03:00
dependabot[bot]
fc387c271a
chore(deps): bump handlebars from 4.1.2 to 4.5.3 in /examples/basic
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-28 01:38:45 +00:00
cristianoccazinsp
7abf3f78cb feat(ios): Make camera ready events to fire also on camera/device change to be consistent with Android. Fire unmount error when session or device fails to start. Update advanced example app to use camera ready event instead. (#2642) 2019-12-13 14:51:50 -03:00
Stanimir
72c5624dd3 fix(example): fixes and updates in mlkit example (#2618) 2019-12-02 09:24:12 -03:00
cristianoccazinsp
cd0ca062e8 feat(docs): update example readme and ios splash screen text (#2589) 2019-11-18 09:53:26 -03:00
cristianoccazinsp
9c6fcea43e feat(example): New example app using RN 0.61, native-base, and react-navigation. (#2588)
Includes a camera screen with support for the right dimensions, aspect ratio, flash, tap to focus, pinch to zoom, flash, and multi camera support.
2019-11-15 11:15:19 -03:00
luancurti
1d6a2ef945 chore(gradle): upgrade gradle version 2019-09-08 22:01:50 -03:00
Simon Stern
c4d86218a5
Merge pull request #2452 from react-native-community/dependabot/npm_and_yarn/examples/basic/mixin-deep-1.3.2
chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 in /examples/basic
2019-08-30 10:48:28 -04:00
dependabot[bot]
368f2d0860
chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 in /examples/mlkit
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-29 01:07:43 +00:00
dependabot[bot]
7a3c8a1a11
chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 in /examples/basic
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-29 00:53:49 +00:00
dependabot[bot]
75d093d69d chore(deps): bump merge from 1.2.0 to 1.2.1 in /examples/basic (#2407)
Bumps [merge](https://github.com/yeikos/js.merge) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/yeikos/js.merge/releases)
- [Commits](https://github.com/yeikos/js.merge/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-07 17:47:17 -03:00
dependabot[bot]
eef42fdf93 chore(deps): bump handlebars from 4.1.0 to 4.1.2 in /examples/mlkit (#2405)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.0 to 4.1.2.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.0...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-07 17:39:50 -03:00
dependabot[bot]
9b3db84898 chore(deps): bump js-yaml from 3.12.1 to 3.13.1 in /examples/mlkit (#2404)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.1 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.1...3.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-07 17:39:38 -03:00
dependabot[bot]
1bf291753c chore(deps): bump js-yaml from 3.12.0 to 3.13.1 in /examples/basic (#2403)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-07 17:39:27 -03:00
dependabot[bot]
96481137fa chore(deps): bump lodash from 4.17.11 to 4.17.14 in /examples/basic (#2369)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 16:09:08 -03:00
dependabot[bot]
4813cf3722 chore(deps): bump lodash from 4.17.11 to 4.17.14 in /examples/mlkit (#2370)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-14 16:09:00 -03:00