Wireless Messaging API (WMA):
The Wireless Messaging API (WMA) is an optional package for the Java 2 Platform,
Mobile Edition (J2ME) that provides platform-independent access to wireless
communication resources like Short Message Service (SMS). Currently WMA can be
used on top of CLDC and MIDP, but could also be implemented on CDC-based
devices.
Package javax.wireless.messaging:
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:
interface | Description |
BinaryMessage | An interface representing a binary message. |
Message | This is the base interface for derived interfaces that represent various types of messages. |
MessageConnection | The MessageConnection interface defines the basic functionality for sending and receiving messages. |
MessageListener | The MessageListener interface provides a mechanism for the application to be notified of incoming messages. |
TextMessage | An interface representing a text message |
Wireless Messaging API (JSR-120):These are given below:
API call | Permission(s) |
open("sms:// ...", WRITE) |
javax.microedition.io.Connector.sms javax.wireless.messaging.sms.send |
open("sms:// ...", WRITE, boolean) |
javax.microedition.io.Connector.sms javax.wireless.messaging.sms.send |
open("sms:// ...", READ) |
javax.microedition.io.Connector.sms javax.wireless.messaging.sms.receive |
open("sms:// ...", READ, boolean) |
javax.microedition.io.Connector.sms javax.wireless.messaging.sms.receive |
open("sms:// ...", READ_WRITE) |
javax.microedition.io.Connector.sms javax.wireless.messaging.sms.send javax.wireless.messaging.sms.receive |
open("sms:// ...", READ_WRITE,
boolean) |
javax.microedition.io.Connector.sms javax.wireless.messaging.sms.send javax.wireless.messaging.sms.receive |
open("cbs:// ...", READ) |
javax.microedition.io.Connector.cbs javax.wireless.messaging.cbs.receive |
open("cbs:// ...", READ, boolean) |
javax.microedition.io.Connector.cbs javax.wireless.messaging.cbs.receive |