Related Explain as below:
1
Code:
APPSTATE_STOPPED -> APPSTATE_STARTING
Request for app to start. If app can be started then, 2 or 3-based on
whether it has to be started in FG or BG.
2.1 and 2.2
Code:
APPSTATE_STARTING -> APPSTATE_TOP_VISIBLE or APPSTATE_BACKGROUND
Based on whether it has to be started in FG or BG.
2.1 Send EVT_APP_START
2.2 Send EVT_APP_START_BACKGROUND
3.1
Code:
APPSTATE_TOP_VISIBLE -> APPSTATE_SUSPENDED
On EVT_APP_SUSPEND
3.2
Code:
APPSTATE_SUSPENDED -> APPSTATE_TOP_VISIBLE
On EVT_APP_RESUME
4.1
Code:
APPSTATE_TOP_VISIBLE -> APPSTATE_BACKGROUND
On EVT_APP_STOP, set dwParam to FALSE. The top-visible application can force
the EVT_APP_STOP event by calling ISHELL_CloseApplet() on itself.
4.2
Code:
APPSTATE_BACKGROUND -> APPSTATE_TOP_VISIBLE
Any background application may return to the foreground by calling
ISHELL_StartApplet() on itself, which will make it top-visible.
5
Code:
APPSTATE_BACKGROUND }
APPSTATE_TOP_VISIBLE } -> APPSTATE_CLOSING
APPSTATE_SUSPENDED }
On EVT_APP_STOP event.Can come when
- BREW closes the application on shutdown
- Call ISHELL_CloseApplet() with the clsid of the app.
Code:
APPSTATE_CLOSING -> APPSTATE_STOPPED
App closed and item removed from history