Receive a message notification

  1. Import the required classes and interfaces.
    import net.rim.blackberry.api.mail.event.FolderListener;
    import net.rim.blackberry.api.mail.event.StoreListener;
    import net.rim.device.api.system.ControlledAccessException;
    
  2. Implement the FolderListener and StoreListener interfaces.
    public class MailTest implements FolderListener, StoreListener { ... }
  3. Check for a ControlledAccessException if your application accesses an object that you do not have permission to access.

Was this information helpful? Send us your comments.