Motorola MOTORAZR maxx V6 Developer's Manual page 163

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

Advertisement

Java ME Developer Guide
Chapter 22 - Network APIs
public class regThread extends Thread{
public void run(){
try {
long delay = Integer.parseInt(tf.getString()) * 1000;
long curTime = (new Date()).getTime();
System.out.println(curTime + delay);
PushRegistry.registerAlarm("WakeUp", curTime + delay);
mainForm.append("Alarm registered successfully");
} catch (NumberFormatException nfe) {
mainForm.append("FAILED\nCan not decode delay " + nfe);
} catch (ClassNotFoundException cnfe) {
mainForm.append("FAILED\nregisterAlarm thrown " + cnfe);
} catch (ConnectionNotFoundException cnfe) {
mainForm.append("FAILED\nregisterAlarm thrown " + cnfe);
}
}
}
}
SMS_send.java
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.io.PushRegistry;
import javax.wireless.messaging.*;
import javax.microedition.io.*;
public class SMS_send extends MIDlet implements CommandListener{
public Display display;
public static Form messageForm;
public static Form mainForm;
public static Command exitCommand;
DRAFT - Subject to Change
[163/201]

Advertisement

Table of Contents
loading

Table of Contents