Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Using PIM functions

by Retired ‎02-12-2010 03:07 PM - edited ‎09-17-2010 04:28 PM (2,797 Views)

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

  1. Open rolodex_1.zip
  2. In the IDE, open the rolodex.jdw workspace
  3. Open the Rolodex.java source file.

Tasks

  1. Add code to the onSave() method to complete the following tasks:
    1. define variables to store the information that the user entered in the UI
    2. verify that the user entered a first and last name
    3. open the handheld address book database
    4. create a new contact with the information that the user entered
    5. save the contact to the address book
    6. reset the UI fields to be empty
  2. Build and run your application in the simulator.
  3. In your application, create and save a contact.
  4. Open the handheld address book and verify that the contact appears.

Check Your Work

 

Check out rolodex_2.zip

 

Review

 

In this exercise, you discovered the following things:

  • how to access the handheld address book database
  • how to create and add a contact
Contributors
Users Online
Currently online: 15 members 2,998 guests
Please welcome our newest community members: