I need to read all contacts that belong to a specific account and sort them by their name.
And I would like to get them sorted in the Cursor rather then sort them after in an array.
This is what I currently do:
I make a query in
ContactsContract.RawContacts.CONTENT_URIand get theirContactsContract.RawContacts._IDmake another query after it's data in
ContactsContract.RawContacts.Entity.CONTENT_DIRECTORYbased on the id and- add it to an array. (it doesn't seem a great solution but I don't know about any other way to achieve this)
What am I missing?
Run query like this
Now cursor retrun shoted value