BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-28-2008, 03:07 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default stop folderlistener

Please Login to Remove!

Hi,
i have a folderlistener which listens if a new email has been added. if i close my applocation with System.exit(0); then the lister is still active. how can i destroy this listener?

i have it in an own class. by closing my application i set the instance of my class = null:
PHP Code:
// clsEmail handle the mailevent
public class clsEmail implements FolderListener {
//...
//create
clsEmail myMail = new clsEmail(this);
//...
//destroy ???
myMail null
thanks hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 11-28-2008, 04:08 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

somewehere in your code you are registering your folder listener like this
Code:
Store store = Session.getInstance(new ServiceConfiguration(uidValue, cidValue))
                            .getStore();
store.addFolderListener(fldListener);
to remove the listener do it in a similar way:

Code:
Store store = Session.getInstance(new ServiceConfiguration(uidValue, cidValue))
                            .getStore();
store.removeFolderListener(fldListener);
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 11-28-2008, 04:34 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

it was to simple ;)

thank you.
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Westinghouse Semiconductor NEW 1N4045 DU
$30.0
Westinghouse Semiconductor NEW 1N4045 DU pictureNEW IN BOX Bussmann FWH-325A Semiconductor FUSE 325A 500V
$22.0
NEW IN BOX Bussmann FWH-325A Semiconductor FUSE 325A 500V pictureNational Semiconductor MM5837N Digital Noise Source NOS
$10.0
National Semiconductor MM5837N Digital Noise Source NOS pictureNEW Bussmann FWH-300A Semiconductor FUSE 300A 500V
$28.0
NEW Bussmann FWH-300A Semiconductor FUSE 300A 500V pictureNEW IN BOX Bussmann FWH-300A Semiconductor FUSE 300A 500V
$29.94
NEW IN BOX Bussmann FWH-300A Semiconductor FUSE 300A 500V picture






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