com.siemens.mp.gsm
Class SMS

java.lang.Object
  extended bycom.siemens.mp.gsm.SMS

public class SMS
extends Object

Allows to send an SMS to a given number. This is a common, user-readable SMS. See Connection for data transfer via SMS.

Example


Method Summary
static int send(String number, byte[] data)
          Sends a data sms to the specified number.
static int send(String number, String data)
          Sends an sms to the specified number.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

send

public static int send(String number,
                       String data)
                throws IOException,
                       NotAllowedException
Sends an sms to the specified number. The user will be prompted whether an SMS is allowed to be send each time the method is called.

For further information regarding the mapping of Unicode into standard GSM char (7 bit) see the ETSI mapping specifications.

Parameters:
number - phone number to send SMS to
data - SMS text
Returns:
number of characters actually send
Throws:
IllegalArgumentException - the phone number or the text message is missing in method call, or format of the number is incorrect
NotAllowedException - if the transfer is not allowed.
IOException - if the network is not available

Example


send

public static int send(String number,
                       byte[] data)
                throws IOException,
                       NotAllowedException
Sends a data sms to the specified number. The user will be prompted whether an SMS is allowed to be sent each time the method is called.

Parameters:
number - phone number to send SMS to
data - SMS 8 bit data
Returns:
number of Bytes actually sent
Throws:
IllegalArgumentException - the phone number or the data is missing in method call, or format of the number is incorrect
NotAllowedException - if the transfer is not allowed.
IOException - if the network is not available

Example



Generated on 2003-10-17For further information and updates, please visit Siemens mobile Developer Portal