I’ve read through the docs and searched on here, but I’m not quite understanding how all the pieces fit together. Was wondering if anyone has a clear explanation of how to grab a single column of data from Contacts and have it populate an autocomplete box.
Share
In onCreate():
Created a SimpleCursor to create a managed query into the contacts database:
Cursor emailAddressCursor = managedQuery(Contacts.ContactMethods.CONTENT_EMAIL_URI, PROJECTION, null, null, Contacts.ContactMethods.DATA + " ASC");
Created a SimpleCursorAdapter to connect data to the cursor.
Implemented setFilterQueryProvider() in my adapter to return a managed query when constraint is passed in when filtering.
The final step is to call setAdapter() on the TextView passing in your adapter.