Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contacts without an e-mail address are not being displayed on Android #1

Open
petervelosy opened this issue Jul 29, 2020 · 1 comment

Comments

@petervelosy
Copy link

When the contact picker is opened on Android, contacts that have no e-mail address are excluded from the list. It also does not retrieve phone numbers for contacts that have one defined.

I have created a fix for this issue in my fork, I will push it in a moment. It basically queries the ContactsContract.Contacts table first to get the root contact entry, and then the ContactsContract.Contacts.Data table to get the subordinate entries that include e-mail addresses and phone numbers.

This functionality was what I most needed for my current project, but the retrieval of further data that is returned by the iOS version (nickname, job title, etc.) can then be added along these lines so that the two platforms are in sync.

petervelosy pushed a commit to petervelosy/capacitor-contact-picker that referenced this issue Jul 29, 2020
…ed on Android

- Modify the PICK intent so that it loads all root level contact entries (i.e. not only those with an e-mail address)
- Add two content queries so that first the root level contact (ContactsContract.Contacts), and then the subordinate contact data records (ContactsContract.Contacts.Data) are retrieved. This makes it possible to load e-mails and phone numbers for a contact, stored in the latter.
- Add the .gradle/ folder to .gitignore

Refs TeamMaestro#1
@tnoetzel
Copy link

@sean-perkins - Could you merge this in? Looks like @petervelosy fixed this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants