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.
Asked
Active
Viewed 21 times
0
-
Check Permissions: Ensure that you have the necessary permissions in your AndroidManifest.xml file to access contacts. The required permission is `android.permission.READ_CONTACTS`. Make sure you have added this permission in your manifest. – SepJaPro2.4 Jul 14 '23 at 14:25
-
It's the first thing I've checked, and I have android.permission.READ_CONTACTS. – user18107302 Jul 14 '23 at 19:23
1 Answers
0
There is a boolean property to show only visible contacts or all; setting it to true I get the contacts.

user18107302
- 13
- 4