Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Filtering contacts not available #12

Open
ricavir11 opened this issue Feb 11, 2019 · 4 comments
Open

Filtering contacts not available #12

ricavir11 opened this issue Feb 11, 2019 · 4 comments

Comments

@ricavir11
Copy link

ricavir11 commented Feb 11, 2019

Hi,

I'm using v1.0.5.
I'm not able to filter contacts like you mention in README.

var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync(x=>x.Emails.Count > 0);

IContactService does not include any parameter for GetContactList methods :

namespace Plugin.ContactService { public interface IContactService { // Gets contacts in main thread !!!NOT RECOMMENDED IList<Contact> GetContactList(); // Gets contact in an awaitable background task Task<IList<Contact>> GetContactListAsync(); } }

Therefore, I'm obliged to get all contacts from phone before display... and this can take a lot of time when user as more than 500 contacts...

What can I do to enable filtering ?

@ricavir11
Copy link
Author

Found the issue. I had to manually download & install version 1.0.6.
In fact, if you download from nuget manager you will get version 1.05

@differenz-system
Copy link

@enisn Can you please release "Xamarin.Forms.Contacts" nuget 1.0.6 version.

@marionee
Copy link

please release "Xamarin.Forms.Contacts" nuget 1.0.6 version

@petetinv
Copy link

petetinv commented Mar 12, 2020

Don't worry.
In the implementation of this version, filter is not correctly used (so no needed), you can provide your own link filter.
It will be the same because CreateContact is call in all cases.

Filter (or order, etc.) is the responsability of ContentResolver::Query method

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

No branches or pull requests

4 participants