Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0, Mac OS

Get PDF Book Print View
 

Document Information

Getting Started

Features

Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Network Monitoring

Lightweight UI Toolkit

Security and MIDlet Signing

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator (Windows Only)

On-device Debugging

Command Line Reference

Logs

JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSR 180: SIP Communications

JSR 184: Mobile 3D Graphics

JSR 205: Wireless Messaging API (WMA) Support

Using the WMA Console to Send and Receive Messages

Launching the WMA Console

WMA Console Interface

Emulator Phone Numbers

Sending a Text SMS Message

Sending a Binary SMS Message

Sending Text or Binary CBS Messages

Sending MMS Messages

Receiving Messages in the WMA Console

Running WMADemo

Sending Messages from WMA Console to an Emulator

Running WMA Tool

JSR 211: Content Handler API (CHAPI)

JSR 226: Scalable 2D Vector Graphics

JSR 229: Payment API Support

JSR 238: Mobile Internationalization API (MIA)

JSR 256: Mobile Sensor API Support

Index


Running WMA Tool

To send and receive SMS, CBS, and MMS messages from the command line, use

Windows

installdir/bin/wma-tool

Mac OS

installdir/Contents/Resources/bin/wma-tool

The 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:

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

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

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

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

smssend target_phone target_port  message_content

target_phone

target_port

message_content

cbssend

cbssend  message_id  message_content

message_id

message_content

mmssend
mmssend <application id> <subject>     [-to <target phone>]* [-cc <target phone>]* [-bcc <target phone>]*     [-part { <part_from_file> | <part_from_text> } ]*

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

mimeType

To create part_from_text, define the following variable:

text

-to target_phone

-cc target_phone

-bcc target_phone

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

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

Example:

mmssend MyAppId MySubject -to 987654321     -part text="text part" -part file=Duke.png:mimeType=image/png