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
JSR 82: Bluetooth and OBEX Support
JSR 135: Mobile Media API Support
JSR 177: Smart Card Security (SATSA)
JSRs 184, 226, and 239: Graphics Capabilities
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
JSR 211: Content Handler API (CHAPI)
JSR 238: Mobile Internationalization API (MIA)
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.
To launch the console choose Tools > WMA Console.
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.
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 SMS specify the port number 50000.
Use port 50001 for CBS messages.
For MMS messages, use example.mms.MMSDemo as the application ID. This information is part of the Application Descriptor. To view it, right-click on the WMA Demo project and select properties. In the properties window, select the Application Description category and view the Push Registry tab.
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.
Launch the demo and choose MMS Receive.
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.
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.
Click on Send to send the message.
The image and its information are displayed.