Skip to main content

lwuit app restarts when interrupted for example by incomming call

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
obinnahenree
Offline
Joined: 2007-03-08

hi my application always restart when its interrupted. for ex: there is an incomming call and the phone switches to its call aplication. when the application recieves focus again, it immediately moves to the start screen.

How can i prevent this ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
harsha921
Offline
Joined: 2012-09-07

Hi obinnahenree,

U can restrict the restart of app using the following logic:

boolean started=false; // declare this as global

// put this piece of code in startApp().
if (!started) {
started = true;

// start your code here

}

ramesh130
Offline
Joined: 2011-01-07