react-native-contacts icon indicating copy to clipboard operation
react-native-contacts copied to clipboard

Cannot read property 'getAll' of null on Android

Open ketan-pcs opened this issue 1 year ago • 2 comments

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);
          });

ketan-pcs avatar Apr 11 '25 05:04 ketan-pcs

I am getting the same error on Android

fedpre avatar Apr 23 '25 19:04 fedpre

Version 8 works only on iOS, while version 7 works on Android. :(

smmaxim1987 avatar May 02 '25 10:05 smmaxim1987

This issue is stale, please provide more information about the status

github-actions[bot] avatar Jul 02 '25 00:07 github-actions[bot]