If a user of the library called `capture` too early then it tries to get
the device orientation from the RCTCamera instance... which doesn't yet
exist.
Instead of adding anything clever in the library, just call
promise.reject() so that the host application can decide what to do with
this issue (probably wait, retry in a bit).
This mainly effects slower Android devices where the camera can take a
long time to initialize.
* Android tap-to-focus and improved (continuous) auto-focus
Tap-to-focus
- On tap, compute focus area around motion event's location, and pass this to the camera parameters
as the new focus area.
- Adds RCTCameraUtils.java file, so far with only a single function that helps compute the focus area
from a motion event. This file can serve as a location for utility constants and functions for the
rest of the app, where such things can be extracted out.
Improved (continuous) auto-focus
- Use FOCUS_MODE_CONTINUOUS_PICTURE/VIDEO when possible to enable continuous auto-focus; fall back to
FOCUS_MODE_AUTO otherwise, if able.
Other changes
- Update README to specify differences between iOS and Android for focus and zoom functionality.
- Update AndroidManifest with more thorough list of permissions and features.
- Update Example package.json react and react-native dependencies to match root package's package.json.
* Example: default empty onFocusChanged callback
- Enables default tap-to-focus behavior in Example app, facilitating
testing of focus features in the Example app
* Update compileSdkVersion to 25 and buildToolsVersion to 25.0.2
Best to keep these up-to-date. Doesn't affect backwards compatibility.
* Add buildToolsVersion requirement of 25.0.2.
* * removed some of the re-parsing of the output image byte array
* removed re-saving of output file
* moved image processing onto an async task to allow camera to be used while processing is running
* added jpeg compression support for android
* move explanation to correct bit of docs
* 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