Hi all, I am just confused about the behaviour and the correct use of the methods pauseApp() destroyApp(boolean unConditional) notifyDestroyed() notifyPaused() Is there anybody who can tell me the correct use of these methods and the significance in midlet life cycle and when they invoked. Waiting for response....... Regards, Rishi
I add some, pauseApp()- Midlet is about to be placed into paused state. notifyPaused()- Midlet is requesting to be paused. destroyApp(boolean unConditional)- Midlet is about to be shut down. It will release all resources that are still in use. notifyDestroyed()- Midlet is requesting to be shut down. It tell application manager that the Midlet is safe to be shut down.
Thanks Debbie Argulkar & Steffy Sing for the help extended. Here i am discussing the actual problem why i got confused. Now what i think about these methods is as follows :- 1- when application is about to be started or has been paused by notifyPaused() method then it is in paused state. 2- Now in the starting of the application and whenever it will be resumed after paused state startApp() method will be called. 3- If we want to resume the application then resumeRequest() method should be called. 4- whenever we want to pause the application then we will use notifyPaused() and in this case pauseApp() method should be called to save any data which is to be saved to retain the application state. 5- when we want to exit from the application or in other way we want to destroy the midlet then we should call notifyDestroyed() method and in response to that destroyApp() should be called to release the resourse application is using. Now I tried with these methods but found that 1-When we call notifyDestroyed() method it destroys the midlet but never calls the destroyApp() method. 2- When we call notifyPaused() method it never calls the pauseApp() method. 3- if we call the notifyPaused() method and after that again want to activate the midlet then it calls the destroyApp() method and automatically destroys the midlet.
May be i am doing something wrong here but this is why i have been confused about the correct use of these methods. I will be highly obliged if anybody can clear my concepts about the MIDlet basics. Thanks in advance for the help. Waiting for the response Regards, Rishi
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop