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


MOSFET - IRFZ44N 55V - Transistor  for Arduino Pi  TTL picture

MOSFET - IRFZ44N 55V - Transistor for Arduino Pi TTL

$54.79



840PCS 24 Value TO-92 Transistor Assortment Kit Box NPN PNP 2N2222-S9018 / BC327 picture

840PCS 24 Value TO-92 Transistor Assortment Kit Box NPN PNP 2N2222-S9018 / BC327

$14.99



TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor  picture

TO-92 Assortment NPN PNP DIY kit 15 value 600pcs Transistor

$14.40



MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT picture

MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT

$49.72



US Stock 4pcs 2N3055 NPN AF Amp Audio Power Transistor 15A/60V picture

US Stock 4pcs 2N3055 NPN AF Amp Audio Power Transistor 15A/60V

$11.66



MRF150 RF Power Field-Effect Transistor 150 W to 150 MHz New picture

MRF150 RF Power Field-Effect Transistor 150 W to 150 MHz New

$35.00







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