Android Question ContactUtils problem

Almog

Active Member
Licensed User
Hello,

I used contactUtils to search for a contact by name, and display his phone number, but after a few uses, each contact searched is duplicated for 3 or more tines iin my contacts.
Why is it happening? How can I cancel it?

Thanks in advance.
 

DonManfred

Expert
Licensed User
Longtime User
Hard to answer without knowing what you are doing exactly.
 
Upvote 0

Almog

Active Member
Licensed User
Hard to answer without knowing what you are doing exactly.
OK, I will post my code soon...
B4X:
cnt = 0
For Each c As cuContact In cu.FindContactsByName(cntcsNm, False, False)
      cnt = cnt + 1
      phonecounter = True
      Label1.Text = Label1.Text & CRLF & CRLF & cnt & ". " & c.DisplayName & "."
      For Each phone As cuPhone In cu.GetPhones(c.Id)
      If phonecounter Then
          phoneList.Add(phone.Number)
          phonecounter = False
      End If
Next
Dim p As PhoneCalls
p.Call(phoneList.Get(0))
 
Upvote 0

Almog

Active Member
Licensed User
Add: phoneList.Clear
Oh, I meant that the contact is duplicated in my contacts, not as viewed in the list.
Somehow the app is duplicating the contact in the contacts book of my phone, and when I go to my contacts after using the app, a single contact is exist more than one time...
Add: phoneList.Clear
This is also can help in this situation?

Thanks in advance...
 
Upvote 0
Top