I have seen nice diagrams showing the lifecycle of an activity, but I can not find a diagram showing the lifecycle of an application - is there one?
In an activity onCreate is kind-of paired with onStop, I say paired in as much as you know for sure that if onStop() is called then you know for sure that the activity won't run again without calling onCreate(), you can see this at a glance from the diagram.
The particular thing I'm looking for is what method is paired with onCreate in the lifecycle of an application? is it onTerminate?
EDIT: I have something like the following:
public class myapp extends Application
{
@Override
public void onCreate()
{
special_function_startup();
}
}
I want to have a special_function_shutdown() somewhere and I don't want special_function_startup() to be called if it is already started up. So the perfect place to put the special_function_shutdown() is in the method that "corresponds to" onCreate(), like onStop() does in an activity.