Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

(Redirected from WMAPI)

Wireless Messaging API

From Wiki
Jump to: navigation, search
Article Metadata
Article
Created: firt (14 Apr 2007)
Last edited: hamishwillee (24 Jul 2013)

Wireless Messaging API is an optional package for Java ME that provides platform-independent access to wireless communication resources like Short Message Service (SMS) and Multimedia Messages (MMS), as well as Push capabilities (launching a MIDlet on message receipt). WMA can be used on top of CLDC and MIDP.

The classes are under package javax.wireless.messaging.

WMA 1.0 (JSR-120)

Version 1.0 of the specification (JSR 120) allows developers to send and receive SMS in text or binary mode. You can send:

  • A normal SMS text message
  • A text message addressed to a port, for example to be received by another Java ME application listening to this port
  • A binary message addressed to a port, for example to be received by another Java ME application listening to this port.

To send a SMS, you have to use the Generic Connection Framework from Java ME using a protocol sms://. WMA API offers the following classes:

  • MessageConnection
  • MessageListener
  • TextMessage
  • BinaryMessage

You can receive SMS which were sended to a given port, but not normal SMS from the inbox. Restricted ports can also not usable, for example you can not send a WAP-Push SMS.

Using Nokia Connectivity Framework you can test send and receive SMS using two or more Nokia emulators on the same PC. Each emulator will have an SMS number defined in the title area.

The JSR Specification is available at http://www.jcp.org/en/jsr/detail?id=120.

WMA 2.0 (JSR-205)

The differences between WMA 2.0 (JSR-205) and WMA 1.0 (JSR-120) are related primarily to the support of multi-part messages used for MMS messaging, added in this version.

The JSR Specification is available at http://www.jcp.org/en/jsr/detail?id=205.

References

This page was last modified on 24 July 2013, at 04:20.
136 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×