Search code examples
androidcontactsvb4android

Can't get phone contacts (B4A)


I need to get the phone number of a contact by name; I'm using B4A (B4XPages). So I tried ContactUtils and wmContactUtils libs, and also by content resolver, with the official sample of coded; I did not get any error or exception, but I did not get any contacts. I checked for permissions. I've the same iusse on 3 different phones (android 8.1, 11 and 13); I also done phone reset. I did not posted here the code since I used the official samples without any change, but I will if can help.


Solution

  • There is a boolean property to show only visible contacts or all; setting it to true I get the contacts.