Help Center
Local Navigation
- Integrating with BlackBerry Device Software applications
- Unified search
- Device interaction support
-
Message list
- Create a new blank SMS text message
- Create a new populated text message
- Create a new blank MMS message
- Create a new blank email message
- Create a new populated email message
- Create a new blank PIN message
- Create a new populated PIN message
- Receive a message notification
- Add a listener to the message store
- Add a listener to the message store for batch updates
- Add a listener to a folder
- Retrieve the total count of unread email messages in all folders in the store
- Open a message
- Retrieving the body of an email message
- Notify a BlackBerry device application that an email message is about to be sent
- Notify a BlackBerry device application that an MMS message is about to be sent
- Notify a BlackBerry device application that an SMS message is about to be sent
- Send a message
- Reply to a message
- Forward a message
- Work with message folders
- Custom messages
- Attachments
- Calendar
- Contact list
- Task list
- Phone
- BlackBerry Browser
- Menu items
- Find more information
- Glossary
- Provide feedback
- Document revision history
- Legal notice
BlackBerry Manuals & Help
>
Developer Documentation
>
Java Development Guides and API Reference
>
Development Guide
Integration - BlackBerry Java SDK - 6.0
Create a new populated email message
- Import the required classes and interfaces.
import net.rim.blackberry.api.invoke.Invoke; import net.rim.blackberry.api.invoke.MessageArguments; import net.rim.blackberry.api.mail.Address; import net.rim.blackberry.api.mail.Message;
- Create and populate a new email Message object.
Message m = new Message(); Address a = new Address("mLi@rim.com", "Ming Li"); Address[] addresses = {a}; m.addRecipients(net.rim.blackberry.api.mail.Message.RecipientType.TO, addresses); m.setContent("A message for you..."); m.setSubject("Email for you"); - Invoke Invoke.invokeApplication()with the following parameters:
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(m));
Next topic: Create a new blank PIN message
Previous topic: Create a new blank email message