Notify An Application When A List Of Tasks Changes; Code Samples; Code Sample: Creating New Recurring Appointments - Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE Integration Manual

Blackberry device applications integration guide
Table of Contents

Advertisement

See "Code sample: Using tasks" on page 48 for more information.

Notify an application when a list of tasks changes

1.
Create a class that implements the
class myTaskListListener implements PIMListListener {
2. To register to receive notifications of changes to a task list, invoke
BlackBerryPIMList taskList =
(BlackBerryPIMList)PIM.getInstance().openPIMList(PIM.TODO_LIST, PIM.READ_WRITE);
taskList.addListener(new myTaskListListener());

Code samples

Code sample: Creating new recurring appointments

To let the BlackBerry® device user invite attendees to the meeting, combine this sample with ContactsDemo.java.
See "Code sample: Displaying a screen that lets BlackBerry device users add new contacts" on page 45 for more
information.
Example: EventDemo.java
/**
* EventDemo.java
* Copyright (C) 2002-2005 Research In Motion Limited.
*/
package com.rim.samples.docs.eventdemo;
import java.io.*;
import java.util.*;
import javax.microedition.pim.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.i18n.*;
import net.rim.device.api.system.*;
import net.rim.device.api.util.*;
public final class EventDemo extends UiApplication
{
private EventScreen _eventScreen;
public static void main(String[] args)
new EventDemo().enterEventDispatcher();
}
private EventDemo()
_eventScreen = new EventScreen();
pushScreen(_eventScreen);
}
PIMListListener
interface.
{
{
BlackBerryPIMList.addListener()
4: Code samples
.
43

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment 4.6.0

Table of Contents