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


3/4

3/4" NPT, 110/120 VAC N/O Solenoid Valve Plastic Potable Water Normally Open

$39.98



Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid picture

Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid

$28.89



3/4

3/4" Brass Electric Solenoid Valve 110V 120V Volt AC Water Air Gas VITON NC B21

$36.20



1/2 in 12V DC Brass Electric Solenoid Valve NPT Gas Water Air Normally Closed picture

1/2 in 12V DC Brass Electric Solenoid Valve NPT Gas Water Air Normally Closed

$21.79



SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper picture

SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper

$29.29



solenoid picture

solenoid

$15.00







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