Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0

Get PDF Book Print View

Document Information

Getting Started

Java ME Platform SDK 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

Monitoring Network Traffic

Lightweight UI Toolkit

Security and MIDlet Signing

BD-J Support

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator

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

JSRs 184, 226, and 239: Graphics Capabilities

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

JSR 211: Content Handler API (CHAPI)

JSR 238: Mobile Internationalization API (MIA)

JSR 229: Payment API Support

JSR 256: Mobile Sensor API Support

Index

Running WMADemo

The WMADemo sample project shows how to send and receive SMS, CBS, and MMS messages.

The Java ME Platform SDK offers a flexible emulation environment to support messaging. Messages can be exchanged between emulator instances and can be generated or received using the WMA console utility.

Because this sample makes use of the push registry, you can't see all of its features just by using the Run button. Use the Run via OTA feature to install the application into the emulator in a process that mirrors how applications are installed on real devices.

In this demo you send messages between the demo application running on the emulator and the WMA console. Using the WMA console to send messages to the emulator exercises the push registry.

  1. To launch the console choose Tools > WMA Console.

  2. Click on the Send SMS button in the WMA console window. Choose the number that corresponds to the emulator, probably 123456789. If you're not sure what number the emulator is using, look for a number above the emulator screen. Choose the number in the SMS message window, then fill in a port number of 50000. Type your text message in the Message field and click on Send.

  3. The emulator asks if it can launch the WMADemo application. You might receive several permission requests based on your firewall settings.

    Choose Yes. The SMSReceive MIDlet is launched and immediately displays the incoming SMS message.

You can also use the WMA console to send and receive CBS and MMS messages.

If you are attempting to send text messages to WMADemo using the WMA console specify the following port numbers:

For example, to send an MMS message from the WMA console to the emulator, make sure that WMADemo has been installed using Run via OTA.

  1. Launch the demo and choose MMS Receive.

  2. In the WMA console, click on Send MMS to open the MMS composition window. Fill in a message subject, the application ID example.mms.MMSDemo, and the telephone number of the running emulator.

  3. Click on the Parts tab. The WMA console allows you to select files from your hard disk to send as parts of the MMS message. Click Add to add a file to the message. Use the file browser to find the file you want to send and click OK.

  4. Click on Send to send the message.

    The image and its information are displayed.