BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-24-2005, 04:00 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Help Event Notification

Please Login to Remove!

Hi,

I want to write an application that interacts with User's calendar.
I want to get notified when an event is added, updated and deleted.

I have added PIMListListener for EVENT_LIST as

listContact = (BlackBerryPIMList)
PIM.getInstance().
openPIMList(PIM.CONTACT_LIST,
PIM.READ_WRITE);

listEvent = (BlackBerryPIMList)
PIM.getInstance().
openPIMList(PIM.EVENT_LIST ,
PIM.READ_WRITE);

listenerContact = new SContactListener ();
listenerEvent = new SEventListener ();

statusField = new RichTextField("",Field.NON_FOCUSABLE) ;
appScreen = new AppScreen() ;

listContact.addListener(listenerContact) ;
listEvent.addListener(listenerEvent) ;


==========================

public class SEventListener implements PIMListListener{

public static final char RECORD_STATE_DELETED = 'D' ;

//Data store object
private EventDataStore eventDataStore ;

/**
* Default Constructor for Sync4jPIMListener class
* that initializes the store object.
*
* @param void
*
*/
public Sync4jEventListener() {

System.out.println("debug --------------->>>>>>>>>>>>00000000000 -
e");
this.eventDataStore = new EventDataStore();
System.out.println("debug --------------->>>>>>>>>>>>00000000000' -
e");
}

/**
* This method is invoked when the item is added to blackberry
addressbook.
* @param PIMItem ,item that was added to the address book
* @return void
*/
public void itemAdded(PIMItem item) {

System.out.println("debug --------------->>>>>>>>>>>>11111 - e");

storeRecord(item, EventDataStore.RECORD_STATE_NEW);

}

/**
* This method is invoked when the item is updated in blackberry
addressbook.
* @param PIMItem oldItem, item that was changed from the address book
* @param PIMItem newItem, item that is changed from the address book
* @return void
*/
public void itemUpdated(PIMItem oldItem, PIMItem newItem) {

System.out.println("debug --------------->>>>>>>>>>>>222222 - e");

storeRecord(newItem, EventDataStore.RECORD_STATE_UPDATED);
}

.............................




But when I add a new Calendar, this is not notificated to itemAdded(...) in
SEventListener.

Why?
A know issue in
net.rim.blackberry.api.pdap.PIMListListener
javax.microedition.pim.PIM
?

I use JDE 4.0 and default simulator.

Thanks & thanks for any suggestion.
Fabio

--
Sync4j - the open source SyncML mobile application platform - www.sync4j.org
Offline  
Old 05-24-2005, 05:14 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Feb 2005
Model: 7280
Carrier: cingular, no wait, AT&T
Posts: 300
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

a completely random guess, but did you enter the system event queue? I remember having to do this to get notified of IT Policy changes...
I forget where in the API it is...
Offline  
Old 06-03-2005, 01:28 PM   #3 (permalink)
New Member
 
Join Date: May 2005
Model: 8130
Carrier: Telus
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

fabius,

I am having the exact same problem with my app. Did you ever figure this out?

Thanks
Offline  
Old 06-03-2005, 05:27 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Aug 2004
Location: Metro NYC
Posts: 175
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Same thing here when run in the simulator (4.0.0.132). I plan on testing with a physical device.

The contact listener works but not ToDos and Events.
__________________
-- Aric Rosenbaum
BlackBerry consulting, BlackBerry development
www.arconsultinginc.com
BlackBerry consulting and development (RIM SI Partner)
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.