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. Thanks for all your past and future contributions.
Wireless Messaging API
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:
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.