Contact.Getall Problem

madSac

Active Member
Licensed User
Longtime User
I am using below code to get all contacts from mobile but it doesnot show all contacts.What to do ?
B4X:
 Dim Contacts As Contacts
    Dim list1 As List
    list1 = Contacts.GetAll
    Dim listOfNames As List
    listOfNames.Initialize
   
    'Create a list with the contacts names
    For i = 0 To list1.Size - 1
        Dim c As Contact
        c = list1.Get(i) 'fetch the Contact from the original list
        If c.DisplayName.IndexOf("@") = -1 Then 'remove email only contacts
            listOfNames.Add(c.DisplayName)
        End If
    Next
   listOfNames.Sort(True)
    For i = 0 To listOfNames.Size - 1
    clist.AddSingleLine(listOfNames.Get(i))         
    Next
 
Top