Skip to content

Instantly share code, notes, and snippets.

@dceddia dceddia/App.js
Created Jun 15, 2018

Embed
What would you like to do?
Asking for permission to use the camera.
export default class App extends React.Component {
...
componentDidMount() {
Permissions.askAsync(Permissions.CAMERA)
.then(({ status }) =>
this.setState({
cameraPermission: status === 'granted'
})
);
}
render() {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.