SunnyApp / flutter_contact

A flutter plugin for retrieving, creating, saving, and watching contacts on native devices
BSD 3-Clause "New" or "Revised" License
81 stars 62 forks source link

Contacts are returned in random order #5

Closed fedotxxl closed 4 years ago

fedotxxl commented 4 years ago

Hello. I tried to use ordering but it returns contacts with some unpredictable order for me. Finally, I changed in ContentResolver.queryContacts query to

return query(ContactsContract.Data.CONTENT_URI, projections, selection, selectionArgs, "upper("+ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + ") ASC")

copied from https://stackoverflow.com/a/24489525/716027 I think ordering by display name is the most common case. Can you add it?

ericmartineau commented 4 years ago

Sorry for the terribly late response, but can you provide more info about what you were seeing that prompted the change?

ericmartineau commented 4 years ago

I believe this is fixed. 0.6.1