|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MultiPartMessage
Interface for handling short messages consisting of more than 140 octets (160 characters).
| Method Summary | |
|---|---|
void |
buildParts(java.lang.Class type,
int refnr)
Fragmentize the Multipart message. |
void |
buildParts(int refnr)
This method will be called by SmsService implementations prior to
sending a MultiPartMessage. |
SmsMessage[] |
getParts()
Returns the parts (fragments). |
| Method Detail |
|---|
SmsMessage[] getParts()
void buildParts(java.lang.Class type,
int refnr)
throws java.lang.IllegalArgumentException
Invoke this method before sending a Multipart message if you want to specify the type of the resulting fragments.
Example
The following example shows how to set the CIMD2 specific priority flag
on all fragments of a Multipart message:
Ringtone rt = new Ringtone("...");
rt.buildParts(Cimd2Message.class, myRefnr++);
Cimd2Message[] fragments = (Cimd2Message[]) rt.getParts();
for( int i=0; i < fragments.length; i++ ) {
fragments[i].setPriority(new Integer(5));
}
cimd2Service.sendMessage(rt);
type - the type used for the fragments. Must be an instance of SmsMessage.refnr - the reference-number to use for the concatenated messages.
java.lang.IllegalArgumentException - if the type is not an instance of SmsMessage or
is an instance of MultiPartMessage.void buildParts(int refnr)
SmsService implementations prior to
sending a MultiPartMessage.
buildParts() will split the message into multiple parts if necessary. The
parts can then be accessed by calling getParts().
Please note that there is no need to invoke this method directly since SmsService implementations call this method automatically.
refnr - the reference-number to use for concatenated messages.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||