I need to create a MultiAutoCompleteTextView with contact phone numbers on a user device. What I need is like gmail; except gmail email addresses. For contacts, I have the following needs:
Each phone number must contain a record. So, if John has 3 numbers (home, cell, job), they are displayed as 3 entries
each entry is searchable by phone number or by personโs name / surname
To create my adapter, I try to modify the one provided by Google , but when I download the sample, it does not compile (a view from the crappy experience, when a thing is right out of the box, but I'm trying to fix it). Then, using the sample at http://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.html , I will bind my MultiAutoCompleteTextView adapter to the adapter. At the moment Iโm not sure how to convert the adapter according to my needs (i.e., search for contacts by name or phone and get numbers). So my call for help is this: has anyone done this successfully and don't mind sharing their code? Or does anyone know how I can change the associated adapter to give me phone numbers that I can search by name or phone? And thirdly, will the adapter work with MultiAutoCompleteTextView?
Note
Asking this question, I made some assumptions about how Google implements their MultiAutoCompleteTextView for emails. Does anyone know if this code is open source? Does anyone know if my assumptions are correct? Will my idea work for implementing my MultiAutoCompleteTextView contact phone?
UPDATE
So, I have come a long way with the question. Now I use the AutoFill response with a name and number, as in the sms mobile app . But I am trying to convert the implementation to MultiAutoCompleteTextView, but this does not allow multiple entries to be used. Does anyone know how I can finish this?
UPDATE 2
Refer to Autocomplete with a name and number, as in the sms mobile app :
My MultiAutoCompleteTextView is currently working: it allows you to use multiple entries. I just replaced AutoCompleteTextView with MultiAutoCompleteTextView and I ignored another onItemClick answer. It works, sort of. Also, the data I receive is not the good formatted elements that you see in gmail EditText . So, back to the first question: how does Google do this? I donโt want to waste time explaining how gmail compiles editText, as the appropriate reader can readily verify this. In their EditText I can enter four contacts, and then randomly click one at a time to delete it. I want to be able to do this. How?