Contacts

Up: GEOS SDK TechDocs| Up | Down | Next: 1 Setting up a Contact List
| One-page Version of this Chapter for Easy Printing

The Nokia 9110i Communicator uses Contact databases to store "address book" information. Every time the user enters information about how a place may be reached by phone, fax, or e-mail that information is stored in a Contact database, accessed via the contdb library.

Whenever you prompt the user for information about where to send something, you'll probably use a ContactList. This will allow the user to choose which of their contacts should be the recipient.

There are two libraries which exist to keep track of Contact databases and provide an API for the applications which share access to it.

Contact database are Foam databases, and some operations upon the database will make use of Foam database commands. We will not explore the meanings of these commands closely here, but will show how they are used in the context of Contact databases.

Before reading this chapter, you should be familiar with controllers, Object-Oriented Programming, and the GEOS messaging system. It helps if you try out the "Contacts" built-in application, which demonstrates much of the functionality we'll discuss here. The appl/SDK_9000/Contact/ sample application gives full source for the most useful Contact database operations.

Most programmers first encounter the contdb and ContLog libraries when they need to intercept a message associated with a ContactList or perhaps a RecentContactsControl object. These object classes provide the user with a standard way to choose a contact.

There are other controllers which allow the user to choose an SMS contact. SMAddressControlClass allows the user to choose a recipient for a SMS message. This class should cover some applications' needs when it comes to allowing the user to choose a contact. However, if you need a custom control, you may wish to use a ContactList and/or a RecentContactsSMSControl.

A ContactList presents the user with a list of known contacts. The user may choose a name from the list. In Setting up a Contact List, we show how to set up such an object and get the phone number of the contact the user selects.

The RecentContactsSMSControl presents the user with a list containing names and numbers associated with contacts that have recently had SMS transactions with the user. The user may choose a name or number from the list. In Choosing Contacts From a Log, we show how to set up such an object and get the phone number of the contact the user selects.


Up: GEOS SDK TechDocs| Up | Down | Next: 1 Setting up a Contact List