expo 29.0.0 android contacts


#1

Hi,
I have update expo 29.0.0 but the contact in android not have a phone number…

const permission = await Expo.Permissions.askAsync(Expo.Permissions.CONTACTS);
        if (permission.status !== 'granted') {
            Alert.alert(
                'Permission was denied...'
            )
            return;
        }


        const contacts = await Expo.Contacts.getContactsAsync({
            fields: [
                Expo.Contacts.PHONE_NUMBERS,
                Expo.Contacts.IMAGE
            ],
            pageSize: 10000,
            pageOffset: 0,
        });

there is all information but not the phone number…

there is a bug?

thanks a lot


getContactsAsync works on iOS but not on Android
#2

Hey @izzusan,

I haven’t seen other reports of this. Do all of the contacts not have a phone number associated with them?

Cheers,

Adam


#3

yes is correct, in Ios work fine, there is an array of Phone numenr and in Android there isn’t the obj phoneNumber…

I think this is a very serious mistake

I made a downgrade to 28.0.0 and work fine in Ios and Android


#4

Hi @adamjnav I have the exact same problem in android with the Sdk 29.

Plus in some Samsung devices (S4 for example), the contacts are not in order, which was not the case in the

previous Sdk.


#5

Hi all,

Any updates on when this will be solved?

And is there any alternative solution instead of downgrading?


#6

This bug was also reported here: v29 Contacts API problem
I am trying to get the list of all user emails, and everything previously worked perfectly for android/ios and now it is broken on android.


#7

Bumping to keep this alive. Has anyone else found out what’s going on? iPhone is able to pull anything from the Contacts API, but my Android is only able to pull some information.

getContacts = async () => {
    const data = await Contacts.getContactsAsync({})

    console.log(data)
  }

returns at most this:

[...
{
  "contactType": "person",
  "firstName": "Greg",
  "id": "709",
  "imageAvailable": false,
  "lastName": "Abrams",
  "lookupKey": "871i19bc82fe897263f4",
  "name": "Greg Abrams",
}

#8

Hey everyone, we are aware of this bug and we’ll try to get it fixed as soon as we can. In the mean time, a suggested workaround is to use getContactByIdAsync. Certainly not ideal we know, but if this is blocking you it might be worth implementing.

Cheers,

Adam


closed #9

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.