Methods and apparatus for managing execution of an application according
to an application lifecycle. The application lifecycle is managed by an
application manager through a set of commands that enable the application
manager to cause the application to enter one of a plurality of states.
In addition, the application can communicate with the application manager
to indicate that the application cannot change its state as the
application manager has requested or to request that the application
manager change the state of the application to a particular state.