| Reply | « Previous Thread | Next Thread » |
|
Pressing the red button on a Nokia 6230 (Series 40) causes the MIDlet to exit. Is there any way to prevent this from happening ?
|
|
Not in J2ME.
Reason being, imagine you are running this code: Code:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class MyFirstWorking extends MIDlet
{
private Display display = null;
// A required method
public MyFirstWorking(){}
// A required method
public void startApp()
{
display = Display.getDisplay(this);
display.setCurrent(new TextBox("TextBox", "Yer Baby", 50, 0));
}
// A required method
public void pauseApp() { }
// A required method
public void destroyApp(boolean unconditional) { }
}
Now imagine you add code to disable the phones "Hang up key". You now are running an application that requires you to pull the battery out in order to terminate it. |
| alex_crowther |
| View Public Profile |
| Find all posts by alex_crowther |
|
This has of course crossed my mind.
However, I have a code signing certificate and hence a trusted application. I think this should allow me keep the user from unintendedly leaving the applicaiton with unstored data. This is an industrial application, and this might therefore have bad consequences. What is then the purpose of the "unconditional" varialbe in the destroyApp method / event ? //mortem |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|