Motorola V3x Technical Manual page 40

2 cameras; 320x240 display
Hide thumbs Also See for V3x:
Table of Contents

Advertisement

Getting of address:
String address = ((TextMessage)message).getAddress();
Getting of SMS service center address via calling of System.getProperty():
String addrSMSC =
System.getProperty("wireless.messaging.sms.smsc");
Getting of timestamp for the message:
Message message;
System.out.println("Timestamp: " +
message.getTimestamp().getTime());
Creation of client connection, creation of binary message, setting of payload for
binary message and calling of method 'numberOfSegments(Message)' for Binary
message:
BinaryMessage binMsg;
MessageConnection connClient;
int MsgLength = 140;
/* Create connection for client mode */
connClient = (MessageConnection) Connector.open("sms://" +
outAddr);
/* Create BinaryMessage for client mode */
binMsg =
(BinaryMessage)connClient.newMessage(MessageConnection.BINARY
_MESSAGE);
/* Create BINARY of 'size' bytes for BinaryMsg */
public byte[] createBinary(int size) {
byte[] newBin = new byte[size];
}
byte[] newBin = createBinary(msgLength);
binMsg.setPayloadData(newBin);
40
int nextByte = 0;
for (int i = 0; i < size; i++) {
nextByte = (rand.nextInt());
newBin[i] = (byte)nextByte;
if ((size > 4) && (i == size / 2)) {
newBin[i-1] = 0x1b;
newBin[i] = 0x7f;
}
}
return newBin;

Advertisement

Table of Contents
loading

Table of Contents