BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-17-2008, 01:18 AM   #1
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Default itemAdded of PIMListListener

Please Login to Remove!

Sir,
Can you help me on how can I be notified for any contacts added through PIMListListener
?

My side of the story is that:

1. I have implemented PIMListListener in one of the classes
2. My application does not close, instead it switches to the background.
3. now when I change/add contacts in the simulator, and come back, the listener does not notifies me that the change is made
4. My application goes in the event dispatcher Que.

I hope you can help.
Regards
Offline  
Old 09-17-2008, 03:10 AM   #2
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

You have to register your listener to be notified.

taken from the memoapidemo:

Code:
            PIM p = PIM.getInstance();
            try {
                BlackBerryPIMList memoList = (BlackBerryPIMList) p.openPIMList( BlackBerryPIM.MEMO_LIST, BlackBerryPIM.READ_WRITE );
                memoList.addListener( new MemoListListener() );
            } catch ( PIMException e ) {
                // Can't add listener
            }
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 09-18-2008, 01:26 AM   #3
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post no no I have already implemented this, now what, sir?

I have the following implementation:
Code:
_contactList = (ContactList) PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
((BlackBerryPIMList) _contactList).addListener(this);
enumContacts = _contactList.items();
Regards

Last edited by abhsax1978@hotmail.com; 09-19-2008 at 01:22 AM..
Offline  
Old 09-19-2008, 01:21 AM   #4
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Default sorry folks

I did some highlighting to see whether the System.outs were still not coming (in the listeners).
To my surprise, they were coming!!
Thanks
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


NEW SEALED AB 1747-L541 /C SLC 500 SLC 5/04 CPU PROCESSOR UNIT MODULE US picture

NEW SEALED AB 1747-L541 /C SLC 500 SLC 5/04 CPU PROCESSOR UNIT MODULE US

$310.93



Siemens 6ES7214-1HG40-0XB0 Compact Processor picture

Siemens 6ES7214-1HG40-0XB0 Compact Processor

$225.00



AB 1747-L542 /B SLC 500 5/04 CPU PROCESSOR UNIT New Factory Sealed AB 1747L542 picture

AB 1747-L542 /B SLC 500 5/04 CPU PROCESSOR UNIT New Factory Sealed AB 1747L542

$334.57



Hobart Buffalo Chopper Food Processor 84186- Parts picture

Hobart Buffalo Chopper Food Processor 84186- Parts

$399.99



Factory Sealed Allen Bradley 1747-L532 SLC 500 SLC 5/03 CPU Processor Unit picture

Factory Sealed Allen Bradley 1747-L532 SLC 500 SLC 5/03 CPU Processor Unit

$348.00



Allen Bradley 1747-L542 SER C SLC 500 5/04 CPU PROCESSOR UNIT AB 1747L542 picture

Allen Bradley 1747-L542 SER C SLC 500 5/04 CPU PROCESSOR UNIT AB 1747L542

$306.80







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