Skip to content

getContactsByPhoneNumber() & getContactsByEmailAddress() doesn't provide whole contact data in Android #817

@Vivek2204

Description

@Vivek2204

Data in my native directory
FirstName: FNTest
LastName: LNTest
Email: test@gmail.com
Mobile: 123456789
Home: 987654321
CompanyName : CNTest
Address: Mumbai, India

getContactsByEmailAddress() - missing the phoneNumbers and postalAddresses details
{
"phoneNumbers": [],
"isStarred": false,
"postalAddresses": [],
"thumbnailPath": "",
"department": "",
"jobTitle": "",
"emailAddresses": [
{
"id": "191",
"label": "work",
"email": "test@gmail.com"
}
],
"urlAddresses": [],
"suffix": "",
"company": "",
"imAddresses": [],
"note": "",
"middleName": "",
"displayName": "FNTest LNTest",
"familyName": "",
"givenName": "FNTest LNTest",
"prefix": "",
"hasThumbnail": false,
"rawContactId": "4",
"recordID": "4"
}

getContactsByEmailAddress() - missing the emailAddresses and postalAddresses details, also the other number is not present in the phoneNumbers array.
{
"phoneNumbers": [
{
"id": "189",
"label": "Mobile",
"number": "+1123456789"
}
],
"isStarred": false,
"postalAddresses": [],
"thumbnailPath": "",
"department": "",
"jobTitle": "",
"emailAddresses": [],
"urlAddresses": [],
"suffix": "",
"company": "",
"imAddresses": [],
"note": "",
"middleName": "",
"displayName": "FNTest LNTest",
"familyName": "",
"givenName": "FNTest LNTest",
"prefix": "",
"hasThumbnail": false,
"rawContactId": "4",
"recordID": "4"
}

but the behavior is different for iOS, we get whole contact data.
I used getContactsByEmailAddress and then getContactById(recordID) to get the whole contact data in Android.

Suggestion to include the getContactById inside the getContactsByEmailAddress() and getContactsByPhoneNumber() so that user will have consistent behavior in Android and iOS

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions