3
Using the message list
Create new messages
Create new messages
Work with a message
Work with folders
Working with attachments
Task
Steps
Create a new blank SMS text message.
>
Invoke
invokeApplication()
using the APP_TYPE_MESSAGES constant parameter and a
new
MessageArguments
object that uses the ARG_NEW_SMS parameter.
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(
MessageArguments.ARG_NEW_SMS));
Create a new populated text message.
Use the API items in the
javax.wireless.messaging
package (JSR 120).
1.
Create and populate a new
TextMessage
object.
MessageConnection mc = (MessageConnection)Connector.open( "sms://" );
TextMessage m = (TextMessage)mc.newMessage(
MessageConnection.TEXT_MESSAGE );
m.setAddress( "sms://5558888" );
m.setPayloadText( "An SMS Message for you" );
2. Invoke i
nvokeApplication()
with the following parameters:
•
APP_TYPE_MESSAGES: a constant parameter
•
MessageArguments:
a new
MessageArguments
object that uses the new
TextMessage
object.
Invoke.invokeApplication( Invoke.APP_TYPE_MESSAGES, new
MessageArguments( m ) );
Create a new SMS text message with
multimedia.
>
Invoke i
nvokeApplication()
using the APP_TYPE_MESSAGES constant parameter and a
new
MessageArguments
object that uses the ARG_NEW_MMS parameter.
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(
MessageArguments.ARG_NEW_MMS));
Create a new blank email message.
>
Invoke
invokeApplication()
using the APP_TYPE_MESSAGES constant parameter and a
new
MessageArguments
object that uses the ARG_NEW parameter.
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(
MessageArguments.ARG_NEW));
Содержание JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE
Страница 1: ...BlackBerry Java Development Environment Version 4 6 0 BlackBerry Device Applications Integration Guide...
Страница 4: ......
Страница 7: ......
Страница 10: ...10 BlackBerry Device Applications Integration Guide...
Страница 12: ...12 BlackBerry Device Applications Integration Guide...
Страница 50: ...50 BlackBerry Device Applications Integration Guide...
Страница 56: ...56 BlackBerry Device Applications Integration Guide...
Страница 65: ......
Страница 66: ...2008 Research In Motion Limited Published in Canada...