Quantcast
Viewing latest article 12
Browse Latest Browse All 15

Widget Samples series - Address Book

Address Book sample widget

Our Widget Samples series continues with the Address Book sample widget, which demonstrates how to fetch and display address book entries from the phone's address book and launch actions from contact details. For example, selecting a phone number detail launches the phone dialler; selecting an email address detail launches the messaging editor.

The address book API is part of the JIL/WAC PIM API, which enables widgets to interact with the phone's on-board address book and calendar. For example, widgets can create new address book and calendar entries, search for and read existing entries, export entries as VCards, and respond to calendar alerts.

The basic behaviour of the calendar and address book APIs is similar: the main query methods are asynchronous and return results to callback methods that clients must implement and register.

The Address Book sample widget provides a complete example of fetching entries from the address book, filtering displayed entries based on a search term, displaying details when a contact is selected, and launching appropriate actions from the details displayed. You can reuse the sample code as a starting point for your own projects.

The screenshots below show the Address Book sample widget running on the HTC Desire:

Image may be NSFW.
Clik here to view.
Address Book widget on HTC Desire
Image may be NSFW.
Clik here to view.
Address Book widget on HTC Desire

Read the Code Notes

Like all samples in the series we're publishing the complete source code together with detailed Code Notes which walk through the files in detail.

You can download the source code and find the Code Notes here.

What's in the download

The download includes:

  • Fully commented source code, ready to build
  • README.txt

The widget is compatible with the latest Android phones on Vodafone, as well as the Nokia N8.


Viewing latest article 12
Browse Latest Browse All 15

Trending Articles