I am currently developing an App which needs to look up a number of contacts (name and photo) via their phone number.
However, this takes several seconds (For each contact: Look up the contact via their phone number, get contact’s name & photo).
What would be a good strategy to speed this process up? I realize that I could use my own sqlite db which contains a list of exactly those names and photos I need. With such a database I could only do one query, then get the data for all contacts I need at once. This however would add quite some overhead I am hoping to avoid.
Is there a better (speak: simpler) solution?
Thank you.
you can use CursorAdapter and override bindView() method for example:
you would use ContactsContract.CommonDataKinds.Phone.CONTENT_URI instead of ContactsContract.CommonDataKinds.Email.CONTENT_URI .