Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Listening for email and triggering notifications

Started 02-16-2010 by
Modified 09-19-2011 by

Exercise

 

Write an application that registers a custom notification and a folder listener. The folder listener will activate the custom notification when an email arrives with a particular string in the subject of the email.

 

Objectives

·       Discover how to make an application auto-start

·       Discover how to register a folder listener

·       Discover how to register a custom notification

·       Discover how to monitor incoming email

 

Setup

  • Open Listen_1.zip
  • In the IDE, open the FolderListenerApp.jdw workspace
  • Open the MessageNotification.java source file.
  • Open the FolderListenerApp.java source file.

Tasks

  1. FolderListener Changes:
  2. Register the custom notification with the system
  3. Add a FolderListener to the store after it is retrieved
  4. Determine if the incoming message has been added to the INBOX folder
  5. Retrieve the subject of the new message
  6. Trigger the notification once it is discovered that the subject contains the string “< TAG >”.
  7. MessageNotification Changes:
  8. Register the consequence manager
Contributors
Comments
by Developer on 04-12-2011 08:38 AM

How can I download the zip file?

by Developer on 09-26-2011 08:19 PM

Where to download Listen_1.zip?