• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

J2ME: Do not close app when phone closed..

Experts,
          WHAT I WANT: When my application is running....I want to come back to the same state when I open the phone after closing for sometime.

          WHAT I DID: When my application is running------If I close the phone using ExternalDisplayCanvas and display a text in the screen (phone: Motorola i870).....and open the phone, application is not closed..I want exactly like this but I had to display something on the screen to do this..which I do not want.
          But When I do not use ExternalDisplayCanvas and close the phone..app will be closed...

          WHAT I AM DOING RIGHT NOW: I am trying to do with pushRegistry but it became too complicated...is the pushRegistry only way to do it??Am I in the right track?

Any help or insight would be appreciated..

Thanks
0
velosumdev
Asked:
velosumdev
  • 2
3 Solutions
 
sreenathkCommented:
Hi,

 U have to use the Java suspension state. Suspend java and resume wneh u come next time.  Using this it is possible.

Sreenath
0
 
khamoudaCommented:

Hi velosumdev !

I am not sure if I understood your question correctly, but if you switch off the phone completely, it means the application have been closed completely as well. In that case, to reopen it again automatically, you have to use the PushRegistryAlarm to set the alarm ( and also to set some paramters to know your current status for the next open )in the closeApp() Abstract class in the MIDlet, in that case it may :

1- for SonnyEricsson, when you switch on again, it will prompt you to start the application ( you have to permit manually - if your application is not signed ) , in that case you can do whatever you want with the above set parameters

2- for Nokias , the setAlarm will be lost, you have to reopen the application manually

Not sure what is the behaviour of motorola

I wish that helps

0
 
khamoudaCommented:

wasnt this helpful ? or I didnt understand your question ?

thanks
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now