Let’s start by adding an entry to the manifest file:

Iteration after contacts

We are now going to draw contacts. Contacts on the phone are stored in SQLLite and can be processed with a simple cursor. This can be seen in lines 19 to 24. The contact ID and its name, but the phone numbers associated with these contacts are stored in a separate table. Therefore, for each record, we have a separate nested loop that searches for all the phone numbers associated with that contact. We specify the search conditions for each regular SQLLite query, ie giving the appropriate parameter in the ContentResolver query. Example of searching by contact ID on line 31. On a similar basis, we can search data even after the contact name.