Preview on android doesn't show up right away
When picture is taken on android, you can still take another picture until preview is shown up. It takes around 4 seconds before the preview is shown. I have been using <Camera> as well as <RNCamera> and this issue persists on both of them. This doesn't happen on iOS.
Here is what I currently have:
renderCamera() {
return (
<RNCamera
ref={(cam) => {
this.camera = cam;
}}
captureQuality={RNCamera.constants.CaptureQuality.high}
playSoundOnCapture={false}
aspect={RNCamera.constants.Aspect.fill}
captureTarget={RNCamera.constants.CaptureTarget.temp}
touchToFocus={true}
defaultOnFocusComponent={true}
onFocusChanged={() => {console.log("focusChanged");}}
cropToPreview={true}
>
</RNCamera>
<TouchableOpacity
onPress={() => {
this.takePicture();
}}
>
<Icon
name="camera"
size={40}
style={styles.icon}
/>
</TouchableOpacity>
)
}
...
takePicture() {
this.camera.capture()
.then((data) => {console.log(data);
this.setState({ path: data.path});
})
.catch(err => console.error(err));
}
...
renderImage() {
return (
<Image
source={{
uri: this.state.path }}
/>
)
}
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open.
Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.