* - 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.
* Release CF object which could cause a memleak
* 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
* 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)
* 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
* Torch fixes for iOS and a few nil checks.
- Torch turned on by default should work as expected (turned on after mounting and camera type switch)
- Torch maintained when video recording starts (it will flicked if preset has to change)
- Torch resumed when app comes back from background (it is disabled on session pause)
* Fix Torch mode while recording for Android as well.
* Android only: Support to enumerate Camera devices and to select from one of them.
* No need to have the camera in running state if querying for IDs.
* Silly bug, not using string compare. Also, do not run any camera code if the actual camera doesn't change.
* Crash fix when focus coordinates are set to null/undefined not being handled. Notes about not supported flash/focus
* If a camera is not found, set the first available camera just like Camera2 does.
* missing semicolon
* Fixes to Camera2 API:
- First change is related to camera selection by ID. Some more code was required to correctly set the facing flag and characteristics
- Second change fixes a previous issue (unrelated to the PR) that was causing the preview of the camera to look upside down on rotated devices. Device rotation should not affect the display (nor set it). Device rotation should however be used for the final image (and not screen rotation). Some code was borrowed from Camera1.
Setting a property ends up with an unhandled exception that cannot be caught easily by RN. This should also make the behaviour consistent with camera startup and Camera2.
These changes include the following:
- use atomic boolean for capturing photo flag just like video
- add more exception catching and checks
- raise error instead of failing silently if can't capture photo - improve error handling here
- synchronize stop to avoid race conditions and crashes
- delay params updates (surface) if capturing or recording to avoid bugs
- do not allow video or photo capture if already doing video or photo
* Use standardized exposure value between 0 and 1
* Add iOS native exposure control
* Delete logging
* Add documentation + spell fixes
* Update RNCamera.m
* Remove reset of exposure after tap-to-focus
First, it updates the take picture call to capture right away instead of trying to focus again. This will match closer to what the native camera does, and also what the Camera2 does.
Secondly, it removes all calls to resetFocus after capturing and after a given timeout. This was causing issues when using autoFocusPointOfInterest, and it really didn't make sense to use an internal timeout to reset the focus. If anything, the user should do this from the JS side. A new method could also be exposed to do this.
Lastly, it adds some error catching logic to the autoFocus call. There was a chance on some devices that calling autoFocus while the device is capturing a photo that it would fail.
Tested on Google Pixel 2 (Android 9), Motorola G5 (Android 8), Samsung Grand Prime (Android 5?), and LG20 (android 6?). No issues so far.
* upgrading to sdk 28 and androidx
* revert attempt to fix build
* fixing build
* build version fix
* updating example app
* manifest update
* using stable release, instead of beta
* androidx migration doc
* migration doc update
* follow on androidx upgrade after rebase
* upgrading to sdk 28 and androidx
* revert attempt to fix build
* fixing build
* build version fix
* updating example app
* manifest update
* using stable release, instead of beta
* androidx migration doc
* migration doc update
* follow on androidx upgrade after rebase
add face detection using mlkit
add enable tracking prop
cleanup android set tracking methods
remove old face detection
fix basic example not building on ios
* switch to firebase mlkit for text recognition
* migrate android to MLKit
migrate Text detection android to MLKit
update gradle of example app
Update build.gradle
separate gms vision facedetector to general flavor
migrate faceDetector to mlkit and fix incorrect bounds due to padding
migrate barCode detector to mlkit
update android instructions in readme
safe face implementation move gms to generalImplementation
* add mlkit example
setup android of mlkit example
setup ios of mlkit example
fix typo in readme
update example project readme
* amend mlkit migration to include raw data
add barcode detection in basic and mlkit examples
* fix duplicate bridgeDidBackground method
BREAKING CHANGE: We migrated to MLKit instead of Google Mobile Vision
* added react-navigation
* added barcode scanner example
* exposed barcode bounds and source dimensions in google vision barcode
* updated typescript types for google vision barcode