FileDocCategorySizeDatePackage
SmsService.javaAPI DocAndroid 1.5 API3353Wed May 06 22:42:46 BST 2009com.android.im.engine

SmsService

public interface SmsService
An abstract interface to access system SMS service.

Fields Summary
Constructors Summary
Methods Summary
public voidaddSmsListener(java.lang.String from, int port, com.android.im.engine.SmsService$SmsListener listener)
Add a SmsListener so that it can be notified when new SMS from specific address and application port has been received.

param
from The address of the sender.
param
port The application port.
param
listener The listener which will be notified when SMS received.

public intgetMaxSmsLength()
The max number of bytes an SMS can take.

return
the max number of bytes an SMS can take.

public voidremoveSmsListener(com.android.im.engine.SmsService$SmsListener listener)
Remove a SmsListener from the service so that it won't be notified anymore.

param
listener The listener to be removed.

public voidsendSms(java.lang.String dest, int port, byte[] data)
Sends a data SMS to the destination.

param
dest The address to send the message to.
param
port The port to deliver the message to.
param
data The body of the message to send.

public voidsendSms(java.lang.String dest, int port, byte[] data, com.android.im.engine.SmsService$SmsSendFailureCallback callback)
Sends a data SMS to the destination.

param
dest The address to send the message to.
param
port The port to deliver the message to.
param
data The body of the message to send.
param
callback If not null, it will be notified if the message could not be sent.