RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
4/28/2025, copying Lifecycle 2.0 agreed within Firebolt working group from restricted "Simplified Lifecycle2.0" page from "Preferred Program" space to public regular "RDK" space so everyone can read it and can be referred to in App Lifecycle Presentation in Tech Summit 2025 session.
# | Description |
---|---|
0 |
GIVEN a Firebolt app is being loaded WHEN the container is created THEN
|
1 |
GIVEN the platform launched the app with a non- OR the app does not have permission to be loaded directly to WHEN the app calls THEN
|
2 |
GIVEN an app is in the THEN
|
2, 4, 7 |
GIVEN an app is in the WHEN a THEN
See Intents, below |
3a |
GIVEN an app is in the THEN
|
3b |
GIVEN an app is in the WHEN the THEN
|
5a |
GIVEN an app is WHEN it is moved to THEN
|
5b |
GIVEN an App moves from Active to WHEN the THEN
|
6a |
GIVEN an app is WHEN it moves to THEN
|
6b |
GIVEN an app is WHEN the onSuspended notification occurs THEN
|
8a |
GIVEN an app is WHEN the app is being moved to THEN
|
8b |
GIVEN an app is WHEN the app is done executing THEN
|
8c |
GIVEN an app is WHEN the app is being moved to THEN
|
9a |
GIVEN an app is WHEN the app is being moved to THEN
|
9b |
GIVEN an app is WHEN the THEN
|
10 |
GIVEN an app has permission to be loaded directly to AND the platform launched the app with a PreloadIntent WHEN the app calls THEN
|
11 |
GIVEN an app is in WHEN the app is being terminated AND a graceful shutdown is possible* THEN
Determination out of scope for this document, but effort should be made to have this requirement fulfilled as often as possible |
12 |
GIVEN an app is built for W3C / HTML WHEN the app access the Firebolt 2.x SDK THEN the SDK client library MUST NOT have the AND the WPE browser MUST map the Firebolt Lifecycle to the W3C Page Lifecycle* AND the WPE browser MUST handle Firebolt requirements for video, textures, graphics, etc.* Details of the mapping requires review with architecture & engineering, see W3C Page Lifecycle below for draft requirements. |
Non-comprehensive list of intents that are used in concert with Lifecycle to manage the deep-linking and quick switching.
Intent | Schema | Acceptance criteria |
---|---|---|
LaunchIntent |
{ "action": "launch" }
|
WHEN processing a THEN the app SHOULD keep the previous UX visible so the user may return to it WHEN transitioning to Active AND the current intent is a THEN the platform SHOULD unpause any video tags previous paused by the platform in the most recent |
PreloadIntent |
{ "action": "preload" }
|
WHEN transitioning to Paused AND processing a THEN the app SHOULD load / use as little resources at possible AND the platform MUST send the app a new, more specific intent before any transition to Active occurs |
HomeIntent |
{ "action": "home" }
|
WHEN processing a Home THEN the app SHOULD load it's home experience |
This is tentative, requires review with engineering, but having it creates a level of confidence in our model.
API Type:
method = App → Platform
notification = platform → app
Firebolt / Wayland API | API Type | W3C | Firebolt 1.x | Netflix | Cobalt | Prime |
---|---|---|---|---|---|---|
Lifecycle.ready() |
method |
NA |
Lifecycle.ready() |
Lifecycle.ready() |
Lifecycle.ready() |
Lifecycle.ready() |
Discovery.getNavigationIntent() |
method |
Discovery.getNavigationIntent() |
Discovery.getNavigationIntent() |
Discovery.getNavigationIntent() |
Discovery.getNavigationIntent() |
Discovery.getNavigationIntent() |
Lifecycle.close(reason) |
method |
Window.close |
|
|
|
|
Lifecycle.onStart() |
notification |
Window.load |
Lifecycle.onInactive (previous: initializing) |
boot to Background w/ graphics=true |
SbSystemRequestConceal |
AV_DISPLAY_REQUEST_ENTER_BACKGROUND_VISIBLE |
Lifecycle.onStartSuspend |
notification |
NA |
NA |
boot to Background w/ graphics=false |
|
|
Lifecycle.onActivate() |
notification | Document.visibilityChanged = 'visible' Document.visibilityState = 'visible' All video tags unpaused (if paused by WPE via onPause) |
Lifecycle.onForeground (previous: Inactive) |
warm launch to Foreground w/ focus = true |
SbSystemRequestFocus |
AV_DISPLAY_REQUEST_ENTER_FOREGROUND |
Lifecycle.onPause() |
notification |
Document.visibilityChanged = 'hidden' Document.visibilityState = 'hidden' All video tags paused by WPE |
Lifecycle.onInactive (previous: Foreground) |
focus lost to Foreground w/ focus = false Can we pause video in Netflix here? |
SbSystemRequestBlur |
AV_DISPLAY_REQUEST_ENTER_BACKGROUND_VISIBLE |
|
notification |
Discovery.onNavigateTo(intent) |
NA |
move to/stay in Background w/ graphics = true Cancel any content loaded |
|
|
|
notification |
Discovery.onNavigateTo(intent) |
Discovery.onNavigateTo(intent) |
Load new content, stay in Background w/ graphics = true Can Netflix load new content w/out being warmed launched? |
|
|
Lifecycle.onSuspend() |
notification |
Document.freeze() All canvas tags have their context deallocated by WPE |
Lifecycle.onSuspended (previous: Inactive) |
stay in Background w/ graphics = false (possible?) |
SbSystemRequestFreeze |
AV_DISPLAY_REQUEST_ENTER_BACKGROUND |
Lifecycle.onResume() |
notification |
Document.resume() All canvas tags have their context recreated All canvas tags have the W3C onContextLost event is fired |
Lifecycle.onInactive (previous: Suspended) |
stay in Background w/ graphics = true (possible?) | SbSystemRequestConceal | AV_DISPLAY_REQUEST_ENTER_BACKGROUND_VISIBLE |
Lifecycle.onHibernate() |
notification | NA | NA | |||
Lifecycle.onRestore() |
notification | NA | NA | |||
wl_keyboard::enter |
notification | Window.focus() | Lifecycle.onForeground (previous: Background) | |||
wl_keyboard::leave |
notification | Window.blur() | Lifecycle.onBackground (previous: Foreground) |
This is tentative, requires review with engineering, but having it creates a level of confidence in our model.
Sample W3C app:
import { Discovery } from '@firebolt-js/sdk' document.addEventListener("visibilityChange" (event) => { var deeplink = await Discovery.getNavigationIntent() if (deeplink.action === 'preload') { // reset UI and load a low resource, "good" experience, e.g. a splash screen clearUX() showSplash() } else if (deeplink.action === 'entity') { loadDetailsPage(deeplink.data.entityId) } else if (deeplink.action === 'playback') { loadPlayer(deeplink.data.entityId) } // check if visible or hidden if (document.visibilityState === 'visible') { // App moved to Active turnOnAnimations() } else { turnOffAnimations() showSplash() } }) document.addEventListener("resume", () => { showSplash() reauthenticateWithBackoffice() })
All method calls are to app-written functionality's except for Discovery.getNavigationIntent()
List of open items
Use Case | Possible design(s) | Agreement |
---|---|---|
As an app developer I want to know why my app is being suspended |
|
This is actually onDestroy, not onSuspend
TODO: Document enum, add param to onDestroy |
These use cases do not affect the Function Requirements, but need to be solved as part of non-function requirements by architecture & engineering.
Use Case | Possible design(s) | Agreement |
---|---|---|
As an app platform I want to know which apps can be preloaded to suspended False alarm: Jeremy misunderstood bart. |
|
Out of scope
TODO: document capabilities in spec, no APIs |
When does the platform know a direct-to-supend has reached, e.g. how long? |
This requires an architectural conversation, and we'll need to document the expectations, but it doesn't require any additional APIs. TODO: define platform requirements, document. |
|
As an app developer I want to know how long I have to suspend |
|
This requires an architectural conversation, and we'll need to document the expectations, but it doesn't require any additional APIs. TODO: define platform requirements, document. |
As an app developer I want to know how long I have to destroy |
|
This requires an architectural conversation, and we'll need to document the expectations, but it doesn't require any additional APIs. TODO: define non-functional platform requirements |
As a platform I want a deterministic way to know when to activate an app |
|
TODO: define non-functional platform requirements |
Next step: NFR PoC & documentation w/ engineering
from Bart C after finalization discussion, 6 March 25 Update
Various uses case can lead to start or preload an applications. Typically the user will request to start specific App in the IUI (Main UI) with the intent to bring it to the screen.
The IUI will call upon the platform ALM (ALM stands here for ApplicationLifecycleManager) to start specific app_id and optionally also specify via NavigationIntent structure what specific view of the app should be opened.
Technically the ALM will do many things when creating app. Won't describe here everything it does, only parts relevant to this lifecycle. ALM will create session_id/token required for secure communication between App and Firebolt Server. ALM will set the NavigationIntent value it got from IUI on the NavigationIntent singleton associated with that Application_id on the Firebolt Server.
The ALM will check what apptype, prepare and initiate start of associated AppContainer, optionaly set StartTargetState ENV var on AppContainer (that defines target bootflow at moment of containerstart) and and then App process execution within the Container will start. TBD if TBD in actualy native App implementation if bringing StartTargetState ENV variable brings in significant improvement in launch time
The App can/must assume that it is in "INITIALIZING" state from its process start. No specific Notification will be send from ALM to App lto tell it that it is in Initializing state because Firebolt communication between App and ALM is not established yet.
App/AppEngine connects to Firebolt Server App with Authentication token/session_id that it got as env value within the container env.
One of first things App must is to call is Discovery.getNatvigationIntent(2a) , register for each Lifecycle2.0 notifications with Lifecycle.listen('start',callback) pattern and then do
call Lifecycle.ready(2b) method to say to platform it is ready for Lifecycle communications. Important that this Lifecycle.ready method will be returned with OK or ERROR coming from ALM (through FireboltServer) as it serves as confirmation, handshake between App and ALM that Lifecycle communication can start.
Discovery.getNavigationIntent (is singleton for each App_id) returns NavigationIntent for the App. To for example know what screen/deeplink to load in the app. Definition of all intent values in separate section/document
The app will startup either in :
Example use case of flow B)
At box boot the ALM may decide to preload specific applications so these would launch quick (quicker compared to boot from cold start) when user requests them. But to not consume too much resources ALM decides to preload them in Suspended mode directly, provided that the application that supports that. Netflix supports it but for example WebApps won't support preloading them via this flow B) from initializing to suspended directly, these require to be preloaded via passing paused state and then suspend/hibernate them.
3a describes flow from Initializing to PAUSED (see 3a). ALM will send OnStart(3a) to signal App that it must follow flow A to PAUSED and is entering PAUSED state and should initialize its RialtoClient and connect to associated RialtoServer (preparing but not setting up active Audio Video stream Session yet though), setup Wayland-egl surface with associated shell, fetch the App Graphics assets relevant to the NavigationIntent from network/flash and possibly load textures, vertices and shaders in GPU to prepare for frame rendering.
The moment the Application renders its first frame on the actual wayland-EGL surface (eglSwapBuffers & wl.commit) is IMPORTANT Point in Lifecycle model.
Because that is trigger and pre-requisite for the transition to Active and if all conditions are fulfilled will lead to sending of onActivate() message in 4
Notes :
*At the moment the App got onStart event, App can assume it is in PAUSED state even though in reality it may still be transitioning to 'stable' PAUSED state (in ALM internal App state, we will make difference between transition & state at first frame render).
*Important that ALM only sends OnStart event when RialtoServer instance associated with App/AppEngine is ready. ALM must have started RialtoServer instance through RialtoServerManager before seding OnStart notification.
3b)is for preload directly in suspend use case, for example required for netflix, where netflix will boot directly in suspended mode. The App must not setup Wayland-EGL surface, no rialto AV client and should not load textures,vertices, shaders in GPU.
Note that only few apps can support this direct to suspeded mode preload. For example WebApps through browser cannot be preloaded this way. These need to first enter paused state and then moved to suspended state.
REMAINING open QUESTION here : On what basis will ALM know and decide that App can be considered to have landed in Suspended mode instead of still being in transiting state?
The moment the Application renders its first frame on its actual Wayland-egl surface (eglSwapBuffers wl.commit) in PAUSED mode is IMPORTANT tipping Point in Lifecycle model.
Because that will trigger the transition to Active and sending of onActivate (see 4) message if all conditions are fulfilled.
Following chain of events happens underneath: That first fame rendering (first eglSwapBuffers wl.commit) will be detected by westeros wayland window manager and send WstClient_firstFrame event to ALM and ALM in case this is associated with LaunchApp request from IUI (and not preload request) will notify the IUI (MainApp) that this app_id is ready to be made visible. It is IUI that makes the decision to make that app/window visible or not as that depends on expected User behaviour/UI state. In regular App start flow that IUI will typically decide to make the app visible and will instruct (preferably through ALM) to make the App window visible on the Westeros window manager. IUI will then typically also stop rendering possible App spinner or splash screen it may have rendered to avoid black screen transitions during Apploading transition.
Upon setVisible instruction from IUI ALM will send onActivate (4) notification to the App and do set_visible for that window on windowmanager (typically via westeros simple shell). At wayland level, wayland client app will receive wl_surface.enter event for its surface.
At same time ALM will send event to RialoServer associated with the App to allow active AV sessions. Because App moved to Active state it can now setup actual audio/video sessions through Rialto
Also important is that we require that the App/Appengine first rendered frame is splash screen or a like and does not lead to bad frame-blinking experience for user
Switch from ACTIVE to PAUSED can be quasi atomic only for those Apps that use Rialto because ALM can force AV tear down via RialtoServerManager instantly. Feedback from rialto/experts is that this force tear down will not have negative impact on such app itself (rialto client takes care?, need to confirm that in testing)
Upon switch to Paused state. onPaused(5) event is sent
In suspended mode we expect APP/Appengine to reduce RAM of app, destroy its associated wayland-egl surface (to release associated GFX buffer), release its GPU textures and vertices and shaders in GPU and release Rialto Client, ALM will release/tear down associated Rialto Server instance.
(this states corresponds to Frozen state for WebApps in W3C PageLifecycle - Javascript execution of WebApplications within browser engine will be halted)
All these resouces cannot be atomically released by the app all at once. It will take some transition time (x ms). Also how does ALM know when App has reached the defined suspend mode?
To signal and start that transition to suspended state we send onSuspend (6a) Notification with optionally time in ms we expect App to reach suspended mode. App has now x ms to release resources. Value of sending expected time is in debate.
From App point of view, we consider the app in "suspended state" also during transition state towards "suspended" state. On the ALM side those will remain 2 different states though. (suspending vs suspended)
Around expected transition time, ALM should check, police actual resource deallocation of App. If resouce allocation is still above what is expected the ALM can decided to trigger destroy of the app.
ALM monitor can monitor releasing of
-RAM : monitor PID ram usage:Yes
-EGL surface destroy: event from WesterosWindow Manager : Yes
-releasing GPU memory textures, release GPU objects (triangles) & operations. : Currently RDK has no tools/HAL defined that allows that. to Investigate. Android AOSP is doing it see "adb shell dumpsys gfxinfo <package_name>" and is using Gralloc module for that in its HAL. Sky has addeded cgroup gpu resouce extension and did modifs/adds on gfx driver code to measure usage
Alternative to Full EGL surface destroy by application is reducing its size to 1x1 pixel by the platform Window Manager under the hood. That also releases quasi all memory associated with double/tripple buffer app renders in. Comcast has done positive PoC with that.
App should have released all GPU objects, EGL surfaces and reduced its RAM already in suspended mode. That is pre-requisite and abosolute MUST (No GPU textures, W-EGL surfaces anymore associated wit the App) before app can be transitioned to hibernated mode.
Other pre-requisite is that App/AppEngine is designed to handle restoring from hibernate.
Same pattern. onHibernate (7) notification Event to signal to app that we are about to hibernate within x ms.
Most apps will already have done the necessary things for it in suspended mode. (eg WebApps themselves will have done that,)? A few apps might still have to close few remaining files, nework connections. Platform may decide to tweek those x ms wait for hibernate per app type/platform. The actual technology & component used by the Platform to do App hibernation is MEMCR in RDK.
is about restoring App from Hibernate mode. ALM triggers restore of App processes on MEMCR deamon (eg via wakeup container on dobby)
(question: AML does get success/failure back from MemCR/Dobby when triggering restore but is success always really a success?)
Effectively when restore happend successfully, the App is back in RAM and gets CPU cycles.
ALM then sends onRestore (8) notification ( to App (perhaps with info params like period App was hibernated ) to make App aware it was hibernated, can communicate agan with ALM and can act as trigger for App to do some App component specific refresh/restore logic
We assume that websocket connection between App and FireboltServer was not torn down. Hope that is safe and rocksolid assumption also in corner cases. Will need to be confirmed and well tested, otherwise it will create problems
ALM sends onResume (9a) notification to signal the app to resume and allocate resources again RAM, W-EGL surface, GFX textures, Rialto Client. ALM will reinstantiated associated RialtoServer and set new NavigationIntent prior to onResume Notification.
App can assume it is in PAUSED state when receiving this Notification even though in reality it is still transitioning to stable PAUSED state (in ALM we will make diff between transition & state at first frame rend)
The Notification also serves as trigger for the App to get the Disovery.getNavigationIntent value (see 9b) (which is singleton for each App_id) which App needs to know what screen to load
User/IUM wants to launch app that is PAUZED stated, Since in PAUSED state App is already well preloaded (is hot) transition is quasi instant. Associated new NavigationIntent should set by ALM prior to onActivate (10a) Notification.
onActive Notification is sent by ALM upon IUI trigger together with setVisible on Windowmanager. In this scenario the OnActive Notification also serves as trigger for the App to get the Disovery.getNavigationIntent value (see 10b)
User is interacting with app and uses App menu to exit it. App must use .Close (11) method on FireboltServer to tell ALM and then ALM will initiate either onDestroy, onPaused (and possibly then further OnSuspend) depending on its chosen policy
There can be several reasons why ALM decides to destroy an App. If it decides to destroy the app. It sends onDestroy (12) notification giving Application some time to close some of its internal resources before actually shutting down the AppContainer/killing the App process and providing reason string for destoring it
Acceptance criteria reference the flow diagrams above with a number, (#), next to each MUST/SHOULD/MAY statement.
P0 |
Group: I want to support launching & deep-linking with a good user experience |
||
---|---|---|---|
1 |
|
Given an app is loaded, I want to tell the app what level of loading is expected ...so that the app can load the correct level of resources for the intended use case, no more, no less. |
WHEN an app is loaded THEN the platform MUST be able to return the desired deep-link to the app as soon as the app calls AND there MUST be a valid, non null value for the intent WHEN an app is loaded AND the platform is doing a standard pre-load to P THEN the intent MUST be a AND the AND the platform MUST fire a more specific intent some time before dispatching an WHEN an app is loaded AND the platform is doing a pre-load to THEN the intent MUST be a AND the AND the platform MAY fire a more specific intent some time before dispatching an WHEN an app is loaded AND the platform is doing a cold launch to P AND the platform doesn't have a specific deep-link for the launch THEN the intent MUST be a AND the platform MAY activate the app or not WHEN an app is loaded AND the platform is doing a cold launch to P AND the platform has a specific deep-link for the launch THEN the intent MUST represent the the deep-link that is desired* AND the platform MAY activate the app or not *Complete list of NavigationIntents is out of scope for this document. |
2 |
|
Given an app has initialized Firebolt, I want to immediately send the next state change ...so that the app can continue to load. |
WHEN an app is loading / initializing THEN the app MUST call Lifecycle.ready() as soon as it has set up it's Firebolt event listeners AND the app MUST NOT wait for any asynchronous or CPU intensive process to complete before doing so WHEN an app calls AND it has already called THEN the platform MUST send an error response WHEN an app calls AND it has already registered for the AND the platform is doing a cold launch or pre-load to P THEN the platform MUST send a WHEN an app calls AND it has already registered for the AND the platform is doing a pre-load to THEN the platform MUST send a |
3 |
|
Given an app is loaded, but not yet active, I want it to render a good user experience as quickly as possible ...so that the platform can make it visible any time and the user will have a visual cue that the app is starting up |
WHEN an app is P THEN the platform MAY make the app visible at any point (3a) AND the platform MUST notify the app of this (1, 8b, 4b) AND the app MUST present graphics which provide a good* user experience as quickly as possible (2) AND any animations for said experience MUST be ready, but not actively drawing frames (2) |
4 |
|
Given an app moves into the foreground, it should have loaded and rendered any deep-links as quickly as possible ... so that the user can get to their intended use case quickly. |
WHEN an app receives an AND the app SHOULD immediately begin to fetch and compose the appropriate UX (3b) |
5 |
|
Given an app moves into the foreground, it should be made visible quickly and with a good user experience ...so that the user can be presented with the app's experience. |
WHEN an app is launched with a deep-link AND the app is already in the P THEN the platform MUST dispatch a AND the platform MUST wait to make the app visible until after the AND the platform MUST wait to make the app visible until after the has drawn something* (3a) AND the shared requirements below... WHEN an app is launched without a deep-link AND the app is already in the P AND the most recent intent was a THEN the platform MUST dispatch a AND the platform MUST wait to make the app visible until after the AND the platform MUST wait to make the app visible until after the has drawn something* (3a) AND the shared requirements below... WHEN an app is launched without a deep-link AND the app is already in the P AND the most recent intent was not a THEN the platform MUST wait to make the app visible until after the has drawn something* (3a) AND the shared requirements below... Shared requirements: AND the app MUST now be in the AND the platform MUST notify the app of this transition (3b) AND the app MAY call getNavigationIntent() to check if there is an intent that it missed the event for (3b) AND the app SHOULD immediately begin to fetch and compose the appropriate UX if it has not already (3b) AND the app SHOULD render a UX indicated by the most recent *detection of when the app has "drawn something" is an engineering effort, not in scope for this document. |
6 |
|
Given an app moves out of the foreground, it should remain in it's current UX state for a short amount of time ...so that the user can navigate back quickly to the same experience |
WHEN an app is explicitly exited, e.g. by an exit option in the app's navigation THEN the platform MUST make the app invisible (4a) AND the app MUST be moved to the P AND the app MUST be informed of the exit (4b) AND the app MUST keep it's most recent UX displayed on the screen (4b) AND the platform MUST stop and destroy any audio / video sessions belong to the app (2) AND the platform MAY decide to exit to app for any reason* AND the rest of the acceptance criteria from requirement #3 *Details out of scope for this doc |
7 |
|
Given an app has been paused for a while, I want to tell the app to clear out it's last UX and prepare for a new intent ...so that the app can take less memory and be ready with a good user experience. |
WHEN an app has been paused for a set amount of time* THEN the platform MAY send a "Preload" intent via the onNavigateTo notification AND the rest of the acceptance criteria from requirement #3 *Details out of scope for this doc |
P1 |
Group: I want the active app to get the most resources without giving up fast (hot) launches of other apps (aka Suspended) |
||
8 |
|
Given an app is loaded but not active, I want to ensure it does not negatively impact performance of active apps ...so that the user has a fast, responsive experience |
WHEN an app is P AND the app is no longer needed* THEN the app MUST be moved to the AND the app MUST be informed of the transition (5) AND the app MUST deallocate it's EGL surface (5) AND the app MUST deallocate GPU textures and other GPU memory (5) AND the app MUST deallocate any other memory not necessary for a hot launch (5) AND the platform SHOULD reduce CPU cycles given to the app (5) AND the platform SHOULD reduce platform resources given to the app's graphics surface, e.g. destroy or set it 1x1 (5) AND the platform MAY reduce Network bandwidth available to the app (5) AND the platform MAY decide to suspend the app for any reason* |
9 |
|
Given the user launches a suspended app, I want to bring it back to the running state and activate it ...so that the user has a faster launch time |
WHEN an app is launched AND the app is in the THEN the platform MUST resize the app's graphics plane to full screen (8a) AND the app MUST be moved to the P AND the app MUST be informed that is is resuming (8b) AND the rest of the acceptance criteria from requirement #3 AND the rest of the acceptance criteria from requirement #4 |
10 |
|
Given the user launches many apps, I want to keep the platform running smoothly and manage resources ...so that the user has a fast, responsive experience |
WHEN an app is AND the platform needs more resources* THEN the platform MAY hibernate if appropriate* (7a) OR the platform MAY destroy the app if appropriate* (10) OR the platform MAY leave the app Suspended if appropriate*
|
11 |
|
Given a platform pre-loads an app due to contractual obligations, I want to load it directly to suspended ...so that we don't waste platform resources on apps that might never be launched |
WHEN an app is loaded AND the platform wants to save additional resources AND the app supports these criteria AND the platform decides to do so* THEN the platform MUST load the app directly into the AND the app MUST be informed (5) AND the app SHOULD NOT allocate it's EGL surface (5) AND the app SHOULD NOT allocate GPU textures and other GPU memory (5) AND the app SHOULD NOT allocate any other memory not necessary for a hot launch (5) AND the platform SHOULD reduce CPU cycles given to the app (5) AND the platform SHOULD reduce platform resources given to the app's graphics surface, e.g. destroy or set it 1x1 (5) AND the platform MAY reduce Network bandwidth available to the app (5) AND the platform MAY decide to suspend the app for any reason* |
P1 |
Group: I want to have more apps preloaded than available RAM allows (aka Hibernated) |
||
12 |
|
Given the user launches many apps, I want to keep as many of them pre-loaded as possible ...so that the user has a faster launch time
|
WHEN a AND the platform has determined that the app has released sufficient resources* THEN the app MUST be moved to the AND the app MUST be informed of the transition (7b) TODO is this a SHOULD? AND the platform MUST execute the MemCR routine to store the app's state (7c) AND the platform MUST terminate the original app process and free up its resources TODO is this right? |
13 |
|
Given a user launches a hibernated app, I want to restore it to memory and activate it ...so that the user has a faster launch time |
WHEN an app is launched AND the app is in the THEN the platform MUST execute the reverse MemCR routine to restore the app's state (7d) AND the app MUST be moved to the AND the rest of the acceptance criteria from requirement #11 |
P0 |
As a W3C App Developer I want to get all of the benefits of the Firebolt Lifecycle through my existing integration with the W3C Page Lifecycle |
||
14 |
|
Given my app is loading, I want access to the Firebolt ENV variables |
WHEN JS execution begins (0) THEN
MUST already have the ENV values set. |
15 |
|
Given |
WHEN THEN |
16 |
P0 |
Given |
WHEN THEN AND
AND WHEN the Intent is not null THEN my app MUST do all of the responsibilities denoted in Lifecycle.activate() (requirement #4) WHEN the Intent is a Launch Intent AND the platform had previously dispatched an THEN any |
17 |
P2 |
Given |
WHEN THEN Document.visibilityState MUST be fired AND
AND any |
18 | P1 | Given Lifecycle.onSuspend happens, I want to be notified via standard HTML events |
WHEN Lifecycle.onSuspend is invoked on WPE
THEN AND |
19 |
P1 |
Given |
WHEN THEN |
20 |
P1 |
Given |
WHEN THEN the WPE browser MUST handle all necessary work |
21 |
P1 |
Given |
WHEN Lifecycle.onRestore is invoked on WPE
THEN the WPE browser MUST handle all necessary work |
Can't share the Neflix info on public site, requires appropriate access control
Referring to restricted pages behind access control
Simplified Lifecycle 2.0#ApplicationStates
https://docs.netflixpartners.com/docs/nrdp/nrdp2024/application-states-and-management/
https://developers.google.com/youtube/cobalt/docs/reference/starboard/modules/16/event
https://developers.google.com/youtube/cobalt/docs/reference/starboard/modules/16/system
https://developers.google.com/youtube/cobalt/docs/gen/cobalt/doc/lifecycle
Application State | Description | Diagram |
---|---|---|
Started |
Visible; focused; foregrounded The Started state; this should roughly correspond to a "focused application" in a traditional window manager, where the application is fully visible and the primary receiver of input events. |
|
Blurred |
Previously called paused Visible, unfocused; foregrounded This should roughly correspond to "unfocused application" in a traditional window manager, where the application may be partially visible. |
|
Concealed |
Previously called suspended (and preloading) Hidden, unfocused; backgrounded This is a intermediate state between blurred and frozen. This should roughly correspond to "minimization" in a traditional window manager, where the application is no longer visible. However, the background tasks can still be running. |
|
Frozen |
Previously called suspended Hidden, unfocused; backgrounded In the Frozen state, the application will be resident, but probably not running and has no network access. The expectation is that an external system event will bring the application out of the Frozen state. |
Cobalt does not support any particular shutdown reasons–the app can be killed or transitioned between states without specifying a reason.
Can't share the Amazon info on public site, requires appropriate access control
Referring to restricted pages behind access control
Simplified Lifecycle 2.0#Prime
https://partnercentral.amazon.com/docs/avpkv6/display.html