Closed josemh closed 7 years ago
Which Plugin does this impact: Contact - https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Contacts
Calling CrossContacts.Current.Contacts.ToList() should return a list of all contacts.
I get the following error: Java.Lang.IllegalArgumentException: the bind value at index 255 is null
Java.Lang.IllegalArgumentException: the bind value at index 255 is null
It seems there is a contact on this particular phone with an null CONTACT_ID. Perhaps this is due to data corruption.
In the following method of the ContactsHelper class (line 63):
internal static IEnumerable<Contact> GetContacts(ICursor cursor, bool rawContacts, ContentResolver content, Resources resources, int batchSize)
The id should be checked for null. So line 88 should be change from:
if (uniques.Contains(id))
To:
if (uniques.Contains(id) || id == null)
Add better null handling to contact loading.
will be in https://github.com/jamesmontemagno/ContactsPlugin Updated the code to reflect this.
Which Plugin does this impact: Contact - https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Contacts
Bug
Expected Behavior
Calling CrossContacts.Current.Contacts.ToList() should return a list of all contacts.
Actual Behavior
I get the following error:
Java.Lang.IllegalArgumentException: the bind value at index 255 is null
It seems there is a contact on this particular phone with an null CONTACT_ID. Perhaps this is due to data corruption.
Steps to reproduce the Behavior
In the following method of the ContactsHelper class (line 63):
The id should be checked for null. So line 88 should be change from:
To:
Feature Request:
Add better null handling to contact loading.