Motorola MOTORAZR maxx V6 Developer's Manual page 165

Java me developer guide
Hide thumbs Also See for MOTORAZR maxx V6:
Table of Contents

Advertisement

Java ME Developer Guide
Chapter 22 - Network APIs
messageForm.setCommandListener(this);
}
public void pauseApp(){
}
protected void startApp() {
display.setCurrent(mainForm);
}
public void destroyApp(boolean unconditional) {
notifyDestroyed();
}
public void showMessage(String s) {
if(messageForm.size() != 0 ) messageForm.delete(0);
messageForm.append(s);
display.setCurrent(messageForm);
}
public void commandAction(Command c, Displayable s) {
if((c == backCommand) && (s == messageForm)){
display.setCurrent(mainForm);
}
if((c == exitCommand) && (s == mainForm)){
destroyApp(false);
}
if((c == sendCommand) && (s == mainForm)){
address = "sms://" + address_tf.getString();
if(port_tf.size() != 0) address += ":" + port_tf.getString();
text = message_text_tf.getString();
new send_thread().start();
}
}
public class send_thread extends Thread{
public void run(){
try{
conn = (MessageConnection) Connector.open(address);
if(!binary_cg.isSelected(0)){
txt_message = (TextMessage)
conn.newMessage(MessageConnection.TEXT_MESSAGE);
txt_message.setPayloadText(text);
DRAFT - Subject to Change
[165/201]

Advertisement

Table of Contents
loading

Table of Contents