Writing MIDlet for SMS - V

11 April 2008

In this post, I will present pauseApp and destroyApp methods. You are supposed to write these in your application. Do revise MIDlet life cycle for better understanding.

Pause signals the thread to stop by clearing the thread field. If stopped before done with the iterations it will be restarted from scratch later.

public void pauseApp() {
done = true;
thread = null;
resumeScreen = display.getCurrent();
}

Destroy must cleanup everything. The thread is signaled to stop and no result is produced.

public void destroyApp(boolean unconditional) {
done = true;
thread = null;
if (smsconn != null) {
try {
smsconn.close();
} catch (IOException e) {
// Ignore any errors on shutdown
}
}
}

del.icio.us:Writing MIDlet for SMS - V  digg:Writing MIDlet for SMS - V  spurl:Writing MIDlet for SMS - V  wists:Writing MIDlet for SMS - V  simpy:Writing MIDlet for SMS - V  newsvine:Writing MIDlet for SMS - V  blinklist:Writing MIDlet for SMS - V  furl:Writing MIDlet for SMS - V  reddit:Writing MIDlet for SMS - V  fark:Writing MIDlet for SMS - V  blogmarks:Writing MIDlet for SMS - V  Y!:Writing MIDlet for SMS - V  smarking:Writing MIDlet for SMS - V  magnolia:Writing MIDlet for SMS - V  segnalo:Writing MIDlet for SMS - V  gifttagging:Writing MIDlet for SMS - V

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: Writing MIDlet for SMS - V

Leave a Reply