Java Reference
In-Depth Information
CHAPTER 14
Messaging with the Wireless
Messaging API
N early all CLDC devices and some CDC devices provide hardware that connects to
the now-ubiquitous worldwide cellular networks. In addition to providing wireless IP
connectivity to Java ME-enabled devices, these networks provide wireless messaging
over other protocols, such as SMS and MMS. To enable your applications to access these
wireless messaging protocols, Sun Microsystems and its partners developed the Wireless
Messaging API (WMA), a comprehensive suite of messaging interfaces built atop the GCF.
WMA is an optional package for Java ME devices that JSR 120 originally defined and JSR
205 extended to support MMS.
In this chapter, I show you how to use WMA to send and receive SMS and MMS
messages. I begin by discussing wireless messaging services and how they differ from the
typical IP connection functionality you may have encountered in your career. Next, I
show you how WMA is organized, and I introduce the new classes WMA provides. After
that, I show you how to use the Java ME push registry—an important component when
developing and deploying wireless messaging applications. I close the chapter with a
concrete example showing you how to use WMA to send and receive SMS messages in
your application.
Introducing Wireless Messaging Services
Wireless messaging protocols predate both Java ME and IP over cellular networks; the
first digital networks incorporated SMS over the paging channels that the network uses
for call control.
Today, the various wireless messaging services—SMS, Cell Broadcast (SMS-CB),
and MMS—are the bearer networks for countless applications for messaging, premium
content (ring tone, wallpaper, and application) delivery, gaming, and other purposes.
While many applications use these protocols directly, with users originating or receiving
messages using the native messaging application on their wireless device, a growing
number of applications use Java ME front ends to the messaging protocol. This provides
373
 
Search WWH ::




Custom Search