i have added permission and is already given in app to access my contacts but still i see permission denied
React.useEffect(() => {
Contacts.checkPermission().then(permission => {
console.log('see permission', permission);
// Contacts.PERMISSION_AUTHORIZED || Contacts.PERMISSION_UNDEFINED || Contacts.PERMISSION_DENIED
if (permission === 'undefined') {
Contacts.requestPermission().then(permission => {
console.log(permission, 'this is permiso');
// ...
});
}
if (permission === 'authorized') {
Contacts.getAll().then(contacts => {
console.log(contacts);
setContacts(contacts);
});`your text`
}
if (permission === 'denied') {
// x.x
} });
}, []);