Download attachments automatically
When a message arrives in the messages application on the BlackBerry® device with an attachment, you can automatically download the attachment and store it on the BlackBerry device.
Before downloading attachments, the AttachmentDownloadManager class validates the attachment. AttachmentDownloadManager throws exceptions if any of the following conditions occur.
- the application attempts to invoke the download while a download is already in progress
- the application attempts to download zero length files.
- the size of the attachment is larder than permitted by the application IT policy or service books
- attachments are encrypted
- there is not enough space available on the BlackBerry device or SD card
The AttachmentDownloadManager.download() method performs verification during the download process. If verification errors are found, the method throws an exception. For a list of possible verification errors, see the API reference for the BlackBerry® Java® Development Environment.
Note: The BlackBerry® Attachment Service receives all attachments first. Third-party attachment handlers cannot override this default behavior. For more information about the BlackBerry Attachment Service, see the BlackBerry Enterprise Server Administration Guide.
Next topic:
Calendar
Previous topic: Send a message with an attachment