I'm having some issues working with contacts on Android and I was hoping that someone might be able to provide some insight. I'm using Ti.Contacts.getPeopleWithName(query)
to query my contacts database, but it takes several seconds to query the database and return results.
On iOS, with the same set of contacts, the results are very fast (nearly instantaneous).
Here's where things seem to be going wrong:
On Android, when I count the results of getAllPeople, it returns 7,842 contacts. On iOS (again, with the exact same contacts setup), I get 733 contacts.
The difference appears to be that my contacts database is synced with Google Contacts/Gmail, and on iOS, it's only returning the My Contacts group from Gmail; on Android, it's returning My Contacts + Other Contacts (where Other Contacts is everyone who's ever emailed me ever).
What's strange is that this isn't the Titanium behavior on iOS, and it's also not the behavior on my Android's stock Phone app. So I'm wondering:
Is there a good way to handle this? I don't see any options for specifying contact groups on Android, but I can't help but feeling like I'm missing something obvious.
Thanks for any help!