Viewing and Editing Project Properties
Running Projects in the Emulator
Searching the WURFL Device Database
Finding Files in the Multiple User Environment
CLDC Emulation on a Windows Mobile Device
Installing CLDC Emulation on a Windows Mobile Emulator (Windows Only)
JSR 82: Bluetooth and OBEX Support
JSR 135: Mobile Media API Support
JSR 177: Smart Card Security (SATSA)
JSR 205: Wireless Messaging API (WMA) Support
Using the WMA Console to Send and Receive Messages
Sending Text or Binary CBS Messages
Receiving Messages in the WMA Console
Sending Messages from WMA Console to an Emulator
JSR 211: Content Handler API (CHAPI)
JSR 226: Scalable 2D Vector Graphics
JSR 238: Mobile Internationalization API (MIA)
JSR 256: Mobile Sensor API Support
To send and receive SMS, CBS, and MMS messages from the command line, use
Windows
installdir/bin/wma-toolMac OS
installdir/Contents/Resources/bin/wma-toolThe device manager must be running before you launch wma-tool.
When the tool is started, it outputs the phone number it is using.
Each protocol has send and receive commands. The requested command is passed to the tool as a first argument. Possibilities are:
receive
smsreceive - receives SMS messages
cbsreceive - receives CBS messages
mmsreceive - receives MMS messages
smssend - sends SMS message
cbssend - sends CBS message
mmssend - sends MMS message
The *send commands send the specified message and exit. The *receive commands print incoming messages until they are explicitly stopped.
Each command has its own arguments.
smsreceive [-o outputDir] [-t timeout] [-q]
-o outputDir. Store binary contents to outputDir.
-t timeout. Non-interactive mode, waits only timeout seconds for messages.
-f Store text contents as files instead of printing them.
-q Quiet mode.
cbsreceive [-o outputDir] [-t timeout] [-q]
-o outputDir. Store binary contents to outputDir.
-t timeout. Non-interactive mode, waits only timeout seconds for messages.
-f Store text contents as files instead of printing them.
-q Quiet mode.
mmsreceive [-o outputDir] [-t timeout] [-q]
-o outputDir. Store binary contents to outputDir.
-t timeout. Non-interactive mode, waits only timeout seconds for messages.
-f Store text contents as files instead of printing them.
-q Quiet mode.
smssend target_phone target_port message_content
target_phone
Phone number of the target phone. Mandatory first argument.
target_port
Port of the target phone. Mandatory second argument.
message_content
Mandatory third argument. Can have one of these two forms:
text: text of the text message
-f file: sends content of the specified file as a binary message.
cbssend message_id message_content
message_id
ID of the message. Mandatory first argument.
message_content
Mandatory second argument. Can have one of these two forms:
text: text of the text message
-f file: sends content of the specified file as a binary message.
Each part is defined by name=value pairs delimited by the colon separator ":" on Mac OS and the semicolon “;“ separator on Windows. To create part_from_file, define the following variables.
file
File to send as a message part.
mimeType
Mime type of the file.
To create part_from_text, define the following variable:
text
Text to send as a message part. mimeType will be set to text/plain.
-to target_phone
“to” target phone number. Any number of these options can be used.
-cc target_phone
“cc” target phone number. Any number of these options can be used.
-bcc target_phone
“bcc” target phone number. Any number of these options can be used.
Part from Text Options
On Windows, separate options with semicolons. On Mac OS, separate the options with a colon.
Windows: -part contentId=content ID;encoding=encoding;text=text
Mac OS: -part contentId=content ID:encoding=encoding:text=text
Appends text part to the message. Any number of these arguments can be used. Contains the following options:
content ID: content ID of this message part
encoding: Sent text encoding. Only relevant for "text/plain. " Mime type defaults to UTF8.
Part from File Options
Windows: -part mimeType=mime type;contentId=content ID;file=file name
Mac OS: -part mimeType=mime type:contentId=content ID:file=file name
Appends binary part to the message with content loaded from the given file. Any number of these arguments can be used. On Windows, separate the options with a semicolon. On Mac OS, separate the options with a colon. Contains the following options:
content id: content ID of this message part
mime type: mime type of this message part
file name: file with content of this message part
fileEncoding: Encoding of text in the file, only relevant for "text/plain", only applies if the file argument is present. Defaults to the value of the encoding variable.
Example:
mmssend MyAppId MySubject -to 987654321 -part text="text part" -part file=Duke.png:mimeType=image/png