BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 09-28-2004, 07:17 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 - PIMListListener for Events

Please Login to Remove!

Has anyone this problem?

"I'm trying to write an application that interacts with User's calendar. I want to get notified when an event is deleted. I have added PIMListListener for EVENT_LIST as given in the example. When an event is deleted, I'm getting notified through itemRemoved() callback. However I am not able to get the UID of the object. Query for UID "((Event)item).getString(Event.UID)" results in ArrayOutOfBoundsException. I could retrieve rest of the fields of the item (Start,End, Alarm etc.) without any problem."
Query for UID "((Contact)item).getString(Contact.UID)" works fine.

Thanks for any suggestions.
Old 10-12-2004, 07:18 PM   #2 (permalink)
Retired BBF Moderator
Mark Rejhon's Avatar
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Post Thanks: 1
Thanked 0 Times in 0 Posts

I heard that if you use a private static variable (declare the event list as static), the listener will stay continuously resident.

I confirmed this on RIM Developer's forum as well.
Mark Rejhon
Author of XMPP extension XEP-0301: - specification - open source
Old 10-13-2004, 02:49 PM   #3 (permalink)
Thumbs Must Hurt
Join Date: Aug 2004
Posts: 52
Post Thanks: 0
Thanked 0 Times in 0 Posts

It's a known issue, that you are not able to get the UID from an event item once it has been deleted. I have been told it is fixed in 4.0

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.