public class BinaryMessage extends Message
Message.MessageClass, Message.MessageType| Constructor and Description |
|---|
BinaryMessage(java.lang.String from,
java.lang.String to,
byte[] messageBody,
byte[] udh)
Instantiate a new binary sms message request.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParams(org.apache.http.client.methods.RequestBuilder request) |
byte[] |
getMessageBody() |
int |
getProtocolId() |
byte[] |
getUdh() |
void |
setProtocolId(int protocolId) |
getCallbackUrl, getClientReference, getFrom, getMessageClass, getStatusReportRequired, getTimeToLive, getTo, getType, setCallbackUrl, setClientReference, setMessageClass, setStatusReportRequired, setTimeToLivepublic BinaryMessage(java.lang.String from, java.lang.String to, byte[] messageBody, byte[] udh)
from - the 'from' address that will be seen on the handset when this message arrives,
typically either a valid short-code / long code that can be replied to, or a short text description of the application sending the message (Max 11 chars)to - the phone number of the handset that you wish to send the message tomessageBody - The raw binary message data to be sent to a handset.
This api, and the Nexmo sms service will send this data 'as-is' (in conjunction with the binary UDH) and will not make any corrections.
so you should ensure that it is a correctly constructed messageudh - Most binary content will require a UserDataHeader portion of the message containing commands to enable the handset to interpret the binary data
(for example, a binary ringtone, a wap-push, OverTheAir configuration, etc).
Additionally, if you are sending a long text message as multiple concatenated messages and are performing this operation manually rather than
using the automated long sms handling in the Nexmo sms service, then you will need to construct and include here an appropriate
UserDataHeader field that describes the segmentation/re-assembly fields required to successfully concatenate multiple short messages.public byte[] getMessageBody()
public byte[] getUdh()
public int getProtocolId()
public void setProtocolId(int protocolId)