Application lifecycle. How to run something only when application starts

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-03-27T03:42:32Z Indexed on 2010/03/27 3:53 UTC
Read the original article Hit count: 275

Filed under:

I have a dialog popup to indicate how long I want an activity to run. Seems simple enough, but its difficult to determine when the activity is really starting. If the user opens the keyboard on a G1 and thereby goes into landscape, that reruns the activities onCreate method.

I can't have a static for the class or even create an application class, because I can't determine when the 'application' goes away. Even after destroying the only activity, the application is apparently still alive.

Is there a way to determine that onCreate has been called because of the keyboard being extended or landscape mode invoked?

Thanks

© Stack Overflow or respective owner

Related posts about android