The Contacts Service API allows Flash Lite applications to access and manage information about contacts. This information can reside in one or more contacts databases stored on a device or in the SIM card database. You can use the Contacts Service to create Flash Lite applications that:
Retrieve information about contacts, contact groups, and contacts databases
Create, edit, and delete contacts and contact groups
Import and export contacts
Organize contacts into contact groups
The default contacts database is stored on the device and its URI is cntdb://c:contacts.cdb.
It is created when the first contact is added to it. The URI for the SIM card
database is sim://global_adn.
To create a service
object for the Contacts Service API, use Service.Contact to
identify the service provider and IDataSource to identify
the supported interface:
var contact = new Service("Service.Contact", "IDataSource");
The IDataSource interface provides the following
methods:
Use the GetList() method to retrieve information
about contacts, contact groups, or contacts databases.
Use the Add() method to add a contact or contact
group to a contacts database. You can also use this method to edit an existing
contact or contact group.
Use the Delete() method to delete one or more contacts
or contact groups from a contacts database.
Use the Import() method to import a contact to
a contacts database. The information must be imported from a vCard file.
Use the Export() method to export a contact from
a contacts database. The information is exported to a vCard file.
Use the Organise() method to add contacts to a
contact group or to remove contacts from a contact group.
Use the Cancel() method to cancel an ongoing asynchronous
call. This method is valid for any asynchronous call made through the Contacts
Service API.