We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://stackoverflow.com/questions/50063023/camera-always-working-in-react-native-router-flux-scene This is my problem.
There are two scene in parent scene which have tab bar. Initial Scene is simple view and second scene is QR Scanner and it uses RNCamera.
My problem is that Camera always working even though I am working at Initial Scene.
So if I can, I want to change state of second scene, so that stop camera. Or is there any other way to stop camera?
The text was updated successfully, but these errors were encountered:
Answered.
Please use onEnter/onExit function together with Actions.refs.YOUR_CAMERA_SCENE to start/stop camera like this:
<Router ...> <Scene tabs> <Scene /> // Scene1 <Scene key='QR' onEnter={()=>Actions.refs.QR.startCamera()} onExit={()=>Actions.refs.QR.stopCamera()} /> // Scene2 </Scene> </Router>
And your QR React Component should have startCamera and stopCamera methods.
Sorry, something went wrong.
No branches or pull requests
There are two scene in parent scene which have tab bar.
Initial Scene is simple view and second scene is QR Scanner and it uses RNCamera.
My problem is that Camera always working even though I am working at Initial Scene.
So if I can, I want to change state of second scene, so that stop camera.
Or is there any other way to stop camera?
The text was updated successfully, but these errors were encountered: