Home > Articles > Programming > Java

Kicking Butt with MIDP and MSA: Text and Multimedia Messaging

  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
The Wireless Messaging API (WMA) is a bridge between your MIDlets and the wonderful world of text and multimedia messaging. Most mobile phones are capable of sending and receiving messages. WMA extends this capability to MIDlets.

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.

  • Share ThisShare This
  • Save To Your Account

Discussions

comments powered by Disqus

Related Resources

#TuesdayTrivia: Spotlight on WP7 (Win a copy of Sams Teach Yourself Windows Phone 7 Application Development)
By on May 2, 2012Comments
These days, what CAN'T a smartphone do? Microsoft is putting their own spin on things to help you experience "life in motion" when using your device. Instead of containing static application icons, the re-imagined Start screen features live Tiles showing real-time content updates.

March Trivia #1: Let there be light! (Win Microsoft Visual Studio LightSwitch Unleashed)
By on March 13, 2012Comments
Want a simplified self-service tool to help you build business applications for the desktop and beyond? Microsoft programmers… meet Visual Studio LightSwitch.

February Trivia #2: There's an App for That (Win Sams Teach Yourself iOS 5 Application Development in 24 Hours)
By on February 28, 2012Comments
In less than a decade, the iOS platform has changed the way we think about mobile communication.

See All Related Blogs