App Lifecycle

Understanding the app lifecycle of a webOS TV app will help you have a rough sketch on how the app will work, before you start designing your app. This session explains the app lifecycle based on the possible states of an app and transitions between them.

States of an app

The possible states of a webOS TV app are: Not Launched, Launched (Foreground), Suspended (Background). The state of an app can and will be changed by user interactions or system events.

App lifecycle

  • Not Launched : The app has not been launched or it has been terminated.
    In this state, if the app receives a webOSLaunch event or visibilityChange event (visible), it will be launched. A launched or suspended app can be terminated and turns back to the Not Launched state by a user exiting it on the app UI, using ares-launch --close command, or clicking Close App on the menu or Close on RCU on the Simulator.

  • Launched : The app is running in the foreground.
    A launched app can be terminated or suspended at any time. In this state, if the user launches another app, the app will receive a webOSRelaunch or visibilityChange event (hidden) and become suspended and hidden.

  • Suspended : The app is suspended in the background.
    The app can be suspended for a short time to do specific background tasks.
    In this state, if the app receives a webOSRelaunch or visibilityChange event (visible), it will be turned back to the Launched state.

See also

No Headings