![](/images/new-backgrounds/1314580/314580137x1.webp)
CHAPTER 7
Using the Wireless Messaging API
The J2ME Wireless Toolkit supports the Wireless Messaging API (WMA) with a sophisticated simulation environment. WMA 1.1 (JSR 120) enables MIDlets to send and receive Short Message Service (SMS) or Cell Broadcast Service (CBS) messages. WMA 2.0 (JSR 205) includes support for MMS messages as well.
This chapter describes the tools you can use to develop WMA applications. It begins by showing how to configure the emulator’s support of WMA. Next, you’ll learn about the WMA console, a handy utility for testing WMA applications. The chapter concludes with a brief description of the network monitor’s WMA support.
7.1Setting Emulator Phone Numbers
Each running instance of the emulator has a simulated phone number that is shown in the title bar of the emulator window. The phone numbers are important because they are used as addresses for WMA messages. By default, the first emulator instance has a phone number of +555000. Subsequent instances of the emulator will have unique numbers in ascending order: +5550001, +5550002, +5550003, etc.
You can affect the assigned phone numbers by choosing Edit > Preferences... from the KToolbar menu and clicking on the WMA tab.
57