|
 |
 |
Exercise
Write an application that adds contacts to the BlackBerry® device address book.
Objective
- Discover how to create a contact in the handheld address book.
Setup
- Download the file
- In the IDE, open the rolodex.jdw workspace
- Open the Rolodex.java source file.
Tasks
- Add code to the onSave() method to complete the following tasks:
- define variables to store the information that the user entered in the UI
- verify that the user entered a first and last name
- open the handheld address book database
- create a new contact with the information that the user entered
- save the contact to the address book
- reset the UI fields to be empty
- Build and run your application in the simulator.
- In your application, create and save a contact.
- Open the handheld address book and verify that the contact appears.
Check Your Work
Download the completed code
Review
In this exercise, you discovered the following things:
- how to access the handheld address book database
- how to create and add a contact
Additional Labs
Go to the next exercise in “Connecting to Email, Calendar and PIM Applications on BlackBerry”, Using the Options API
Back to the Developer Lab Main Menu
|
|
|
|