SendListener in address book cancels timers

I'll try to be as concise and as accurate as possible, but this scenario seems a bit esoteric for me, so...

I have a 'standard' (ala net.rim.blackberry.api.mail.SendListener) SendListener listen on email send events. It works 100%, no problem there, and the event is triggered as expected. Everything is good.

The idea behind my implementation of sendMessage is "wait" (non-blocking) and start a thread that makes the body of the work required.

public boolean sendMessage(net.rim.blackberry.api.mail.Message message) {
  wrapThreadInTimer();
  return true;
}

I wait (using a programmed timer), and then start a thread.

private void wrapThreadInTimer() {
 new Timer().schedule(new TimerTask() {
   public void run() {
     new Thread() {
     public void run() {
       //body of work performed here
    }
    }.start();
  }
 }, 1000);
}

Now it works perfectly when an email is sent to the application messages (Messages - enamel dial).

The esoteric Bit

However, the esoteric part is when sending the application address book (address book-(Select Contact) - Contact E-mail) the Timer never executes its annex (TimerTask).

I also tried a Variant, the wrapThreadInTimer() who starts a thread immediately which, in turn, puts in place a programmed timer. In essence, inversion of control timer and Thread on the code above. Yet once the TimerTask is not running when sending the address book only. Otherwise works very well when sending Messages.

A third variation (plain Thread without the TimerTask) works very well for the sending scenarios.

private void startThreadImmediately() {
    new Thread() {
        public void run() {
            new Worker();
        }
    }.start();
}

It seems that, when you send an email directly from the address book, timers are mysteriously abandoned?

Behavior on 4.6 and 4.5 up to now.

Ok. figured it out. not _that_ esoteric plus.

the address book outputs / stop the process once he sent the e-mail.

which is strange behavior (I think?) given the process so

Open address book

Select the contact

Select the e-mail address of contact

Click send an e-mail

(open an email window... type in message)

Click send

NOTE: address book application is now closed

I expected (but never really noticed until now) that the application of book address would remain open, so you can continue your * original * thread that was looking for contacts.

Whatever he can it of not mysterious at least

Tags: BlackBerry Developers

Similar Questions

  • BlackBerry Smartphones phone Auto Cancel call history, address book contacts

    It's annoying when you select a phone number from your history, contacts or address book and the "BOLD" auto dials the number.

    If you select an incorrect number of touchscreen phone auto dials the selected number wrong, and it's easy to do on a touch screen.

    I want to be able to make the call to the phone call button, so I can check the number before it's called.

    I want to be able to select a phone number and make sure that I have the right one before the phone dials.

    How can I do this?

    No, you're right, thank you for answer.

    I have big fingers and old eyes, then when I select a number to dial from the screen story or contacts I sometimes miss and select the wrong number, and this car becomes dialed.

    So what I was hoping, it was when I select a number that would put it in the field of the dialer and I appeal.

    How could I make sure that I selected and dialed the right number.

    Thank you

  • What happens to the records staff and old e-mail address book when I change to new email

    I got a new email address. I'm going to quit using the former, who was with Comcast when I cancel the Comcast service, how can I make sure that I don't lose my personal folders and the address book. Also, if I can keep the personal folders that contain e-mail messages with the old e-mail address of Comcast, I'll be able to read them?

    Thank you.

    The address book is not affected.
    Comcast is my recollection of a pop email provider. If your via IMAP it's useless to you, so to speak.
    If you right-click on the Comcast account in the folders pane and select settings. Under Server setting for the change of account, do not check for mail setting. Click Advanced settings and change the tick this off server as well. It stop at Thunderbird makes you mad with impossible to sign messages on behalf of the deceased.
    Go to outgoing (SMTP) server and remove the Server SMTP of Comcast. This will avoid you accidentally answering the old post office and get an error as the Comcast account is no longer.

  • How to remove addresses from my address book double

    I havetried to store my address books and those of my Contacts moved to my Personao Addressbook. The latter is now full of duplicates and reanalyses. I can't cancel. This can be automated?

    I doubt that the OP has knowingly downloaded the add-on.

    http://www.Ramsden.org.UK/3_How_to_install_Add-ons_in_Thunderbird.html

  • I can't find delete an address expired in my address book.

    No matter how much time and places, I'm looking in all the groups, folders, and subfolders in my address book I can not prevent a former address, is no longer valid from one of my correspondents to appear as one of the 'auto fill' choices in my mailbox recipient. I can't find it to remove it!

    At first, I tried to remove old ads completely, but after doing this several times (over several days and it complete re-boots), he remained, cancelled, in all the places in my address book! Finally, instead of trying to delete its all occurrences, I have just updated the email address on the box change the Contact of his all occurrences, and that took care of this particular problem.

    But I still him popping up with his old address. Where is the list that a contact to hide?

    So it seems that you edit an address book, but the next time you run Thunderbird, the changes are cancelled?

    To do this, I suggest you specifically create a bad Contact in the address book of suspicious, close Thunderbird, re-open and see if your new Contact is still there.

    If this isn't the case, we have demonstrated that the selected address book will not save the changes.

    Select the address book in question, go to Tools | Options of and export using the LDIF option.

    If the address book affected was the personal address book, search for your profile (see Help |) Troubleshooting information), close Thunderbird, and delete abook.mab.

    Similarly, if it was collected addresses, remove history.mab.

    In these cases, you will not be allowed to remove the address book broken itself, where the above actions to remove its data file. Other address books, which is defined by the user, peut be deleted.

    If you have removed one of the two above mentioned address books, and their associated data files, the address book will be automatically re-created by Thunderbird when you run then. You will need to import and create a new address book, but you can then move its content. For this reason, avoid giving the address book imported the same name as an address book existing.

    Now you can import the data (Tools |) Import) the LDIF file and after that, if necessary, move (drag) the Contacts imported into the favorite.

  • Unable to hotsync calendar, tasks and address book

    I am able to hotsync, but I'm unable to sync my calendar, your tasks and address book.  It syncs my notes, but not the other 3, it says they will be cancelled and some of my backup files have managed.  Help, please

    Hello!

    Centro Verizon + cant synchronize calendar, Contacts, and tasks = you have WirelessSync running!

    Go to the Wireless Sync application on your phone, go to settings, then go to connections, then go to advanced, then check "Enable any other Apps Sync" and click ok.  Then close the application and try to synchronize another!

    Message is about: Treo 650 (unlocked GSM)

  • A few server contacts could not be copied to the address book of tis

    Try to sync Yahoo Contacts (entrance on MacBook Pro, OSX 10.11.6) with the Mac Contacts Contacts/iCloud. On iCloud Contacts, a triangle indicates next to 'Yahoo' with the msg "some contacts server may not be copied in this address book.

    Thread on the similar theme that might be able to help - a few contacts server could not be copied into the address book.

  • address book is not displayed when transmitting messages

    When I send a message from my address books don't show in the sidebar so that I can choose to send to.

    In a new message window, press F9.

  • I want to have an icon, not the commands to type for my address book

    Simplify E-mail use. I want an icon that indicates the address book. I want to be able to put an address with a name without having transfer to a separate "private" e-mail account I don't want to tell you I remember a command line to use to access my address book. I want to just push an icon and get to my address book. I used Mozilla Thunderbird for a few years and made adjustments when I switched to Windows 10 this year, but lately, you people make the mozilla too complicated for us grandmother types who want just a plain and simple system. I must leave you, or you can solve this problem?

    sort this out. But seriously I really have no idea what you're talking about, unless you have activated somehow out of the toolbar with the cat from address book and make messages on this subject.

    Press Alt + V and select Toolbars from the menu that appears.
    Make sure that the first four items are checked.

  • How can I find address book on the iMac

    Where the address book on the iMac

    The recent Mac address book was renamed Contacts. According to what is applicable must be found in your Applications folder.

  • Restore the 38.4.0 Thunderbird address book Windows crashed 1511 Pro 10 backup computer NAS

    Hello: Unfortunately, my laptop crashed shortly after download and install Windows Update 1511, luckily I have a backup of NAS of the entire computer.

    I tried several methods to replace the original files of abook.wab & history.wab empty backup. The history.wab transfers showing collected addresses, but not my personal abook.wab address book file.

    I'm assuming that the procedures, I tried Thunderbird forums are for the transfer of the abook.wab are to transfer from one direct to another.

    Any help would be greatly appreciated.

    Thank you
    Mike

    Missing address book problem SOLVED!

    What I did:
    1 uninstalled Thunderbird
    2 remove the entire Thunderbird folder in the folder AppData from my PC
    3 made a clean files and registry CCleaner, PC rebooted and defragmented hard drive.
    4 recovered the entire Thunderbird folder from my NAS backup to my PC AppData folder
    5. re-installed Thunderbird, with my POP3 email addresses and the main address book presents
    6 remove all my POP3 e-mail accounts
    7 re-created all my accounts POP3 e-mail, such as IMAP accounts
    FACT

    Thank you for all your help christ1,
    Mike

  • Address book will not migrate to the new computer

    Windows 10; have new computer and was able to successfully export all of my old emails, but for some reason that my address book are not displayed. Checked my profile and it shows all of my... .mab files but when I click "Address book" in you bird, there is nothing there. Have you tried exporting/import profile but same problem occurs. Thoughts?

    Never mind... solved myself! Thanks anyway... (and BTW, I didn't just "carry on my mail"...) I actually copied my complete profile... have done it before, so I'm not a newbie... it was just a glitch in the newcomputer I solved.)

  • How to import my AOL address book?

    The address book can I access it through Firefox is different from that I get when I open AOL directly instead of through Firefox. Change I made to the address book in AOL do not appear in the address book in Firefox.

    This looks like a problem with AOL.
    For more assistance, please contact AOL support team.

  • How to import an address book of Incredimail

    I want to import my email address of Incredimail and Yahoo and GMX. I can only find a way to Outlook Express. Nothing else. Any ideas?

    "my email address" - what does that mean?

    E-mail accounts? Or books?

    For address books, generally you are looking for a way to export to a file that Thunderbird can import. Yahoo and all offer two gmx export to CSV files.

    I've never used Incredimail. You should probably ask on export on the forums for Incredimail users.

  • Lost address book tab; tab is always visible, but the button does not respond

    a modification of the names and tried to move a single name for another address book file. screen went to the home page and can not open address book tab since.

    BigIron, you still see this problem?

Maybe you are looking for