O'Reilly logo

BlackBerry Java Application Development by Bill Foust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - creating test contacts

  1. Modify the _AddTestAddressesAction menu item in the TimeOff project to look like the following completed code.
    protected MenuItem _AddTestAddressesAction = new MenuItem( "Add Test Data", 800000, 50) { public void run() { PIM pimInstance = PIM.getInstance(); try { // TODO: Create test contacts BlackBerryContactList contacts = (BlackBerryContactList)pimInstance.openPIMList( PIM.CONTACT_LIST, PIM.READ_WRITE); BlackBerryContactList contacts = (BlackBerryContactList)pimInstance.openPIMList( PIM.CONTACT_LIST, PIM.READ_WRITE); BlackBerryContact newContact1 = (BlackBerryContact)contacts.createContact(); BlackBerryContact newContact2 = (BlackBerryContact)contacts.createContact(); String[] names = new String[contacts.stringArraySize(BlackBerryContact.NAME)]; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required