Kicking Butt with MIDP and MSA: Text and Multimedia Messaging
JSR 120 defines WMA 1.1, which encompasses Short Message Service (SMS), commonly known as text messaging or texting. JSR 205 defines WMA 2.0, which adds support for Multimedia Messaging Service (MMS).
WMA 2.0 is a superset of WMA 1.1. MSA requires WMA 2.0, but most MIDP devices out in the world today support WMA 1.1 or WMA 1.0. If you are aiming your application at the widest possible audience, stick to the basic SMS functionality provided by WMA 1.1. On the other hand, if you are targeting MSA devices, you can use the full range of MMS supported by WMA 2.0.
Like other network communication, WMA is based on the Generic Connection Framework (GCF) that you read about in Chapter 18. Use Connector to get a MessageConnection. The MessageConnection, in turn, can be used to create, send, and receive messages.
WMA is a compact API that lives in javax.wireless.messaging.
19.1 Why Messaging?
WMA is a great solution for some kinds of network communication, although the usual caveats about device testing apply. SMS and MMS travel through a store-and-forward network, which means that messages are not lost if the destination is unavailable. For example, if you send a message to your friend when your friend's phone is turned off, the network hangs on to the message until it can be delivered to the phone. One good application for WMA is to transmit turns between players in a slow-moving, turn-based game like chess.
Another advantage to SMS and MMS is that they do not involve a server. You can easily communicate between applications running on different devices with no server-side programming.
Finally, WMA combined with the PIM API is a powerful combination. The PIM API gives your application access to people your user cares about. WMA gives you the ability to send those people messages.