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

Tektronix 465 Oscilloscope Capacitors NOS Sprague New Old Stock
$24.78
Tektronix 465 Oscilloscope Capacitors NOS Sprague New Old Stock pictureMaxwell Super Capacitor BCAP0350 E270 T11
$14.95
Maxwell Super Capacitor BCAP0350 E270 T11 pictureAgilent Keysight 11742A Blocking Capacitor 45MHz-26.5GHz, Several Available GOOD
$87.5
Agilent Keysight 11742A Blocking Capacitor 45MHz-26.5GHz, Several Available GOOD pictureL 50-PCS LOT Capacitors 160V 13.300pf Polystyrene
$0.99
L   50-PCS LOT Capacitors  160V   13.300pf    Polystyrene picturea 50-PCS LOT Capacitors 160V 15200PF Polystyrene
$0.99
a   50-PCS LOT Capacitors  160V    15200PF    Polystyrene picture






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