![]() |
Home · All Classes · All Functions · | ![]() |
Files:
This example shows how to access contact information asynchronously using the Contacts API. It generates a large number of contacts automatically, saves them to an in-memory, anonymous contacts store, and allows the user to view them in a model view. It then simulates incoming calls from random phone numbers, and displays information about the contact calling if the random phone number matches a phone number of a generated contact.
This application was written to provide an example to developers of how to use the Qt Contacts API. It uses an asynchronous method to retrieve details of contacts on demand, and displays them in a model view. It also provides an example of simple string matching on contact phone numbers to perform identification.
A real address book may contain hundreds or even thousands of contacts. Being able to load a small portion of those contacts on-demand as required (for example, those visible in the UI currently, plus some cached), as opposed to the entire dataset, is a vital requirement.
The application is not very interactive. The only allowable user interaction is the ability to scroll around the list of contacts, and to view the details of contacts from which a simulated phone call is coming.
The example is not intended to be feature complete. Also, the example model view and result caching engine performs superfluous asynchronous requests (i.e., for data already contained in the contact cache).
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 (Technology Preview) |