Sms Port Numbers; Sm Port Number - Motorola C381P J2ME Technical Manual

J2me developer guide
Table of Contents

Advertisement

10
JSR 120 – Wireless Messaging API
(MessageConnection)Connector.open("sms://:6000");
Messages received with this identifier will then be delivered to the application by this
connection. A server mode connection can be used for both sending and receiving
messages. A client mode connection is opened by providing a URL which points to
another device. A client mode connection can only be used for sending messages.
(MessageConnection)Connector.open("sms://+441234567890
:6000");

SMS Port Numbers

When a port number is present in the address, the TP-User-Data of the SMS will contain
a User-Data-Header with the application port addressing scheme information element.
When the recipient address does not contain a port number, the TP-User-Data will not
contain the application port addressing header. The J2ME MIDlet cannot receive this kind
of message, but the SMS will be handled in the usual manner for a standard SMS to the
device.
When a message identifying a port number is sent from a server type
MessageConnection
number of the
the message that will be received by this
However, when a client type
with a port number, the originating port number is set to an implementation specific value
and any possible messages received to this port number are not delivered to the
MessageConnection
When a MIDlet in server mode requests a port number (identifier) to use and it is the first
MIDlet to request this identifier it will be allocated. If other applications apply for the same
identifier then an
MessageConnection
MIDlet will not be allocated the identifier. The port numbers allowed for this request are
restricted to SMS messages. In addition, a MIDlet is not allowed to send messages to
certain restricted ports a
JSR 120 Section A.6.0 Restricted Ports:
2805, 2923, 2948, 2949, 5502, 5503, 5508, 5511, 5512, 9200, 9201, 9202, 9203, 9207,
49996, 49999.
If you intend to use SMSC numbers then please review A.3.0 in the JSR 120
specification. The use of an SMSC would be used if the MIDlet had to determine what
recipient number to use.
, the originating port number in the message is set to the port
MessageConnection
MessageConnection
. Please refer to the section A.4.0 and A.6.0 of the JSR 120.
will be thrown when an attempt to open
IOException
is made. If a system application is using this identifier, the
SecurityException
. This allows the recipient to send a response to
MessageConnection
is used for sending a message
will be thrown if this is attempted.
.
42

Advertisement

Table of Contents
loading

Table of Contents