使用本机相机拍摄多张图像

时间:2018-02-01 11:05:45

标签: android react-native react-native-camera

我试图用ReactNativeCamera模块拍摄多张图片。我首先有两个函数用于拍摄图像:

<p:poll interval="10" listener="#{serverNodesView.updateNodes}" update="@(.ui-outputpanel) @(.ui-panelgrid)" />

当发生这种情况时,屏幕会冻结我拍摄的图像。我现在无法拍摄另一张照片。我已经尝试过了:

takePicture() {
  const options = {};
  this.setState({searching:false});
  this.camera.capture({metadata: options})
    .then((data) => {
      console.log(data);
      this.setState({filePath:data.path})
    })
    .catch(err => console.error(err));
}

任何想法我做错了什么,或者如何重新启动图像预览?

1 个答案:

答案 0 :(得分:1)

所以我在这里找到了解决方案:https://github.com/react-native-community/react-native-camera/issues/1115

在0.13版本的React Native Camera模块中似乎存在错误。

相关问题