BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 04-17-2007, 10:27 AM   #1 (permalink)
New Member
Join Date: Apr 2007
Model: 8290
Carrier: Rogers
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Cancelling tone/vibration notification of an incoming e-mail?

Please Login to Remove!

Hey guys,

I've put together a little application that implements the FolderListener interface to send an auto-response when an e-mail with a particular subject line is received.

The problem is, while deleting the incoming e-mail is no problem, I'm not sure how I would go about silence the tone/vibration an incoming e-mail would typically generate.

Can anyone lend a hand? I've included the relevant portions of my code below. The thought I had was to use NotificationsManager.cancelImmediateEvent to silence the event, but it doesn't seem to be working - or I may simply have the wrong parameters. Thank you!

public class MobileApplication extends Application implements FolderListener {
    // Required method; executed when a message is added to the store.
    public void messagesAdded(FolderEvent e) {        
        // Retrieve the message and folder it was added to.
        Message originalMessage = e.getMessage();
        Folder messageFolder = originalMessage.getFolder();

        // If the folder of the new message is the INBOX...
        if (messageFolder.getType() == Folder.INBOX) {
            // Get the message subject.
            String subject = originalMessage.getSubject();
            // Check the subject line for the 'tag'.
            if (subject.indexOf("<TAG>") != -1) {
                // Kill the tone/vibrations that normally would occur when a message is received.
                NotificationsManager.cancelImmediateEvent(e.MESSAGE_ADDED, e.MESSAGE_ADDED, e, null);  

Last edited by yllus : 04-17-2007 at 10:29 AM.
Old 04-17-2007, 02:01 PM   #2 (permalink)
Thumbs Must Hurt
Join Date: Aug 2005
Location: Charlottetown, PEI, Canada
Model: 7250
Carrier: Bell
Posts: 95
Post Thanks: 0
Thanked 0 Times in 0 Posts

the easy way to kill the tone/vibration on email receipt as a user is to change the Profile to Phone Only or Off - perhaps you can access this function?
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

NEW BELLOFRAM 961-111-000 TRANSDUCER 961111000
NEW BELLOFRAM 961-111-000 TRANSDUCER 961111000 pictureSiemens 3C80D 3.0Mhz Transducer
Siemens 3C80D 3.0Mhz Transducer pictureSiemens 3C20D 3.0Mhz Transducer
Siemens 3C20D 3.0Mhz Transducer pictureOlympus Sonosurg G2 Generator with Scissors and Transducer
Olympus Sonosurg G2 Generator with Scissors and Transducer pictureLUCAS SCHAEVITZ DTR-451 DIGITAL TRANSDUCER READOUT

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