I’m having a problem with my autocompletetextview.
I’m trying to get the autocomplete get my contacts. Apparently I have scoured everywhere for tutorials, but as I am a starting Android developer, I’m having a hard time to understand how. So could somebody help me by giving me sample code for autocomplete.
I have already finished this;
<uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>
And I have already placed this;
AutoCompleteTextView phonenumber;
phonenumber= (AutoCompleteTextView)findViewById(R.id.tosend1);
My question is how am I going to get all of my contacts and put it in a list?
I have already used the sample in developer android and it already shows values, but I want to use it using the data from the phonebook. How am I going to put it in contactlist?
static final String[] contactlist = new String[] {"value1"};
Try this code this is a working one