Get Contact Photo by Name or Number

PhillipMorris

Member
Licensed User
Longtime User
Hello,

Trying to find a quick way to get a contact photo, I read about GetContactsByQuery.
Can somebody please tell me how to pass the query to the function. I dont find any examples of the syntax in the forum.

Thanks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can use FindByName to find contacts by their name. Finding the contact based on the phone number is more problematic due to the way the contacts are saved internally. One possible solution is to use GetContactsAsync to get all contacts and then when you have all the contacts you can use them to search for the phone number.
 
Upvote 0
Top