react-native-contacts
react-native-contacts copied to clipboard
Cannot read property 'getAll' of null on Android
This is my code
PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.READ_CONTACTS,
{
title: 'Contacts',
message: 'This app would like to view your contacts.',
buttonPositive: 'Please accept bare mortal',
},
)
.then(res => {
console.log('Permission: ', res);
Contacts.getAll()
.then(contacts => {
// work with contacts
console.log(contacts);
})
.catch(e => {
console.log(e);
});
})
.catch(error => {
console.error('Permission error: ', error);
});
I am getting the same error on Android
Version 8 works only on iOS, while version 7 works on Android. :(
This issue is stale, please provide more information about the status