OS version
react-native-permissions version
1.1.1
The app crashes if the permissions is granted or denied.
const granted = await Permissions.request('camera');
alert(granted);
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
console.log('You can use the camera');
} else {
console.log('Camera permission denied');
}
Explain what you did, what you expected to happen, and what actually happens.
Provide some code if needed.
Expect to grant or deny the permissions but the app crashes.
Do you know what needs to be done to address this issue? Ideally, provide a pull
request with a fix.
I am not sure if the React-native-navigation is causing the problem. I created brand new project without react-native-navigation and it works fine.
if my activity launches twice,i can't get the permission dialog and dismiss it before finish,so the app will be crashed
Any Solution yet? I'm having the same issue as it crashes app when allow permissions for the first time.. after that it's running smooth.
I am closing this since this issue does not exists anymore with the 2.0.0 release.