You Are Here:

Community: Developer Discussion Boards

#1 Old Red (hang-up) button on Nokia 6230 - 2004-11-11, 10:58

Join Date: Mar 2004
Posts: 10
mortem
Offline
Registered User
Pressing the red button on a Nokia 6230 (Series 40) causes the MIDlet to exit. Is there any way to prevent this from happening ?
Reply With Quote

#2 Old 2004-11-12, 13:57

Join Date: Aug 2003
Posts: 232
Location: uk
Send a message via ICQ to alex_crowther
alex_crowther's Avatar
alex_crowther
Offline
Regular Contributor
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) { }
}
You will notice it provides no way to quit though the application itself.

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.
Reply With Quote

#3 Old 2004-11-12, 18:50

Join Date: Mar 2004
Posts: 10
mortem
Offline
Registered User
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 With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia