If you denied the permission.. App crashed and stucked and it always open on same screen (stucked). Need help
Have you solved it?
Nope. Please help me to resolve this error.
??
Thanks for your reply guys. Error is still there. It crashes the app if your permission is denied or you denied the permission. I don't why I am facing this.
Contacts.getAll((err, contacts) => {
try
{
if (err) throw err;
} catch (e) {
if(e==="denied")
{
this.setState({isProgress:false});
alert('please allow contacts permission from Device Setting')
}
return;
}
this.setState({
allContect:contacts
})
i fix this error by exception handling this is temporary solution
I used the react-native-permissions package to fix that: https://github.com/react-native-community/react-native-permissions. This way I can check permissions status, request permission and open settings to allow permissions in case user denied it.
This issue is stale, please provide more information about the status
Most helpful comment
i fix this error by exception handling this is temporary solution