I want to use the Push registry to start the midlet at a specified time. When I run the app, even when the time is exceeded the midlet is not started..
public void 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();
}
Anyone has ever faced a similar problem?How to sort this out?