Camera doesn't turn off when change Tab/View
render() {
const { hasCameraPermission } = this.state;
if (hasCameraPermission === null) {
return <View><Button
onPress={() => this.showCamera()}
title="Show Camera"
/>
</View>;
} else if (hasCameraPermission === false) {
return <Text>No access to camera</Text>;
} else {
return (
<View>
<Camera>
</Camera>
</View>
);
}
}
In the view i have the button that can display the Camera. But once, the camera if turn on. When i change tab (tab nvigation) and come back to the view, i doesn't have the button, but a black screen. it seems the camera is not turn off.
Thank you