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

Vintage Collectible Memory Loop Clk. Osc. board.
$3.97
Vintage Collectible  Memory Loop Clk. Osc. board. pictureSony ICD-MS1 Digital Voice Recorder with 16 MB Memory Stick and Case
$11.99
Sony ICD-MS1 Digital Voice Recorder with 16 MB Memory Stick and Case pictureSmith Corona NA1HH Memory Correct Portable Electronic Typewriter Works Great
$30.0
Smith Corona NA1HH Memory Correct Portable Electronic Typewriter Works Great picture3.6v 80 mah Nicad / Nimh rechargeable Ram Memory Battery
$4.0
3.6v 80 mah Nicad / Nimh rechargeable Ram Memory Battery pictureAvaya DAL1 S0 V1 DAL 2 DUP Memory PCI Module 700405079
$8.99
Avaya DAL1 S0 V1 DAL 2 DUP Memory PCI Module 700405079 picture






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