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


LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter picture

LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter

$9.95



US Stock Analog Panel AMP Current Ammeter Meter Gauge DH-670 0-100A DC & Shunt picture

US Stock Analog Panel AMP Current Ammeter Meter Gauge DH-670 0-100A DC & Shunt

$18.98



US Stock Analog Panel AMP Current Ammeter Meter Gauge DH-670 0-200A DC & Shunt picture

US Stock Analog Panel AMP Current Ammeter Meter Gauge DH-670 0-200A DC & Shunt

$18.91



US Stock DC -100A ~ +100A Analog AMP Current Needle Panel Meter Ammeter & Shunt picture

US Stock DC -100A ~ +100A Analog AMP Current Needle Panel Meter Ammeter & Shunt

$21.33



US Stock DC 0 ~ 5A Round Analog AMP Current Pointer Needle Panel Meter Ammeter picture

US Stock DC 0 ~ 5A Round Analog AMP Current Pointer Needle Panel Meter Ammeter

$15.95



DC 100A 100V Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt picture

DC 100A 100V Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt

$12.99







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