1
我想使用Push註冊表在指定的時間啓動midlet。當我運行應用程序,即使時間超出的MIDlet未啓動..如何在特定時間自動啓動midlet?
公共無效的startApp(){
System.out.println("AlarmMIDlet: startApp");
try {
Date now = new Date();
long previous;
String cn = this.getClass().getName();
System.out.println("Class name : "+cn);
previous = PushRegistry.registerAlarm("hello.AlarmMIDlet", now.getTime() + 600);
System.out.println("AlarmMIDlet: time of previous alarm: " + previous);
} catch (java.lang.ClassNotFoundException cnf) {
System.out.println("AlarmMIDlet: Class not Found");
} catch (javax.microedition.io.ConnectionNotFoundException connnf) {
System.out.println("AlarmMIDlet: Connection Not Found");
}
System.out.println("AlarmMIDlet: startApp: return");
notifyDestroyed();
}
任何人都曾經面對過類似的問題?如何排序了這一點?
你有這個工作嗎? – Sydwell 2011-08-05 18:30:35