-
Notifications
You must be signed in to change notification settings - Fork 12
LifecycleManagement
Version LifecycleManagement 1.0.0-next.2
To use the LifecycleManagement module, you can import it into your project from the Firebolt SDK:
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
A module for managing application lifecycle.
Internal API for Close Provider to send back error.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
error |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:state |
Example 1
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.closeError",
"params": {
"error": {
"correlationId": "123",
"result": {
"code": 1,
"message": "Error"
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Internal API for Close Provider to send back response.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
response |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:state |
Example
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.closeResponse",
"params": {
"response": {
"correlationId": "123",
"result": null
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Internal API for Finished Provider to send back error.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
error |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:state |
Example 1
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.finishedError",
"params": {
"error": {
"correlationId": "123",
"result": {
"code": 1,
"message": "Error"
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Internal API for Finished Provider to send back response.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
response |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:state |
Example
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.finishedResponse",
"params": {
"response": {
"correlationId": "123",
"result": null
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Internal API for Launch Provider to send back error.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
error |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:launch |
Example 1
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.launchError",
"params": {
"error": {
"correlationId": "123",
"result": {
"code": 1,
"message": "Error"
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Internal API for Launch Provider to send back response.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
response |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:launch |
Example #1
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.launchResponse",
"params": {
"response": {
"correlationId": "123",
"result": {
"success": true
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Example #2
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.launchResponse",
"params": {
"response": {
"correlationId": "123",
"result": {
"success": false
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
To listen to a specific event pass the event name as the first parameter:
listen(event: string, callback: (data: any) => void): Promise<number>
Parameters:
Param | Type | Required | Summary |
---|---|---|---|
event |
string |
Yes | The event to listen for, see Events. |
callback | function |
Yes | A function that will be invoked when the event occurs. |
Promise resolution:
Type | Description |
---|---|
number |
Listener ID to clear the callback method and stop receiving the event, e.g. LifecycleManagement.clear(id)
|
Callback parameters:
Param | Type | Required | Summary |
---|---|---|---|
data |
any |
Yes | The event data, which depends on which event is firing, see Events. |
To listen to all events from this module pass only a callback, without specifying an event name:
listen(callback: (event: string, data: any) => void): Promise<number>
Parameters:
Param | Type | Required | Summary |
---|---|---|---|
callback | function |
Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see Events. |
Callback parameters:
Param | Type | Required | Summary |
---|---|---|---|
event |
string |
Yes | The event that has occured listen for, see Events. |
data |
any |
Yes | The event data, which depends on which event is firing, see Events. |
Promise resolution:
Type | Description |
---|---|
number |
Listener ID to clear the callback method and stop receiving the event, e.g. LifecycleManagement.clear(id)
|
See Listening for events for more information and examples.
To listen to a single instance of a specific event pass the event name as the first parameter:
once(event: string, callback: (data: any) => void): Promise<number>
The once
method will only pass the next instance of this event, and then dicard the listener you provided.
Parameters:
Param | Type | Required | Summary |
---|---|---|---|
event |
string |
Yes | The event to listen for, see Events. |
callback | function |
Yes | A function that will be invoked when the event occurs. |
Promise resolution:
Type | Description |
---|---|
number |
Listener ID to clear the callback method and stop receiving the event, e.g. LifecycleManagement.clear(id)
|
Callback parameters:
Param | Type | Required | Summary |
---|---|---|---|
data |
any |
Yes | The event data, which depends on which event is firing, see Events. |
To listen to the next instance only of any events from this module pass only a callback, without specifying an event name:
once(callback: (event: string, data: any) => void): Promise<number>
Parameters:
Param | Type | Required | Summary |
---|---|---|---|
callback | function |
Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see Events. |
Callback parameters:
Param | Type | Required | Summary |
---|---|---|---|
event |
string |
Yes | The event that has occured listen for, see Events. |
data |
any |
Yes | The event data, which depends on which event is firing, see Events. |
Promise resolution:
Type | Description |
---|---|
number |
Listener ID to clear the callback method and stop receiving the event, e.g. LifecycleManagement.clear(id)
|
See Listening for events for more information and examples.
To provide a specific capability to the platform. See Provider Interfaces for a list of interfaces available to provide in this module.
provide(capability: string, provider: any): void
Parameters:
Param | Type | Required | Summary |
---|---|---|---|
capability |
string |
Yes | The capability that is being provided. |
provider |
any |
Yes | An implementation of the required interface. |
See Provider Interfaces for each capabilities interface definition.
Internal API for Ready Provider to send back error.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
error |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:state |
Example 1
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.readyError",
"params": {
"error": {
"correlationId": "123",
"result": {
"code": 1,
"message": "Error"
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Internal API for Ready Provider to send back response.
Parameters:
Param | Type | Required | Description |
---|---|---|---|
response |
ProviderResponse |
true |
Result:
null
Capabilities:
Role | Capability |
---|---|
provides | xrn:firebolt:capability:lifecycle:state |
Example
JSON-RPC:
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.readyResponse",
"params": {
"response": {
"correlationId": "123",
"result": null
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Called before an app is launched in order to set up the lifecycle session. The session should be given an intent that will be passed to the application. This will behave differently depending on the current state of the application. If the application is already loaded but not active then a new active session is started. The intent is given to the application via the onNavigateTo event. If the app is not loaded, then it is considered a 'cold start'. A new loaded session will be created and the intent will be stored for the app to access via Parameters.initialization. Before a session is created for the application some checks may take place. For instance, if a user grant is required for the application then the user grant will be resolved before the session is created. In this case, this API will return immediately with a state='pending'. The created session will then be sent as an event in the LifecycleManagement.onSessionCreated event. If the pre-session checks fail, such as a user deferring a grant, then the LifecycleManagement.onSessionCanceled event will be emitted.
function session(session: AppSessionRequest): Promise<AppSession | object>
Parameters:
Param | Type | Required | Description |
---|---|---|---|
session |
AppSessionRequest |
true |
Promise resolution:
AppSession | object
Capabilities:
Role | Capability |
---|---|
manages | xrn:firebolt:capability:lifecycle:state |
Starts or updates an app session
JavaScript:
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
LifecycleManagement.session({
"app": {
"id": "SomeApp",
"url": "https://some-app.firebolt.rdkcentral.com"
},
"runtime": {
"id": "WebBrowser-1"
},
"launch": {
"intent": {
"action": "search",
"data": {
"query": "Dog videos"
},
"context": {
"source": "voice"
}
}
}
})
.then(result => {
console.log(result)
})
Value of result
:
{
"appId": "SomeAppId",
"sessionId": "c0d012b4-0854-4bbc-82d5-ab52ac29dd94",
"loadedSessionId": "612f307e-8b32-412e-bcec-831779bc07ae",
"activeSessionId": "05b6f6af-c2f8-4761-beeb-6029590b8e8c",
"state": "created"
}
JSON-RPC:
Request:{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.session",
"params": {
"session": {
"app": {
"id": "SomeApp",
"url": "https://some-app.firebolt.rdkcentral.com"
},
"runtime": {
"id": "WebBrowser-1"
},
"launch": {
"intent": {
"action": "search",
"data": {
"query": "Dog videos"
},
"context": {
"source": "voice"
}
}
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"appId": "SomeAppId",
"sessionId": "c0d012b4-0854-4bbc-82d5-ab52ac29dd94",
"loadedSessionId": "612f307e-8b32-412e-bcec-831779bc07ae",
"activeSessionId": "05b6f6af-c2f8-4761-beeb-6029590b8e8c",
"state": "created"
}
}
Starts an inactive app session
JavaScript:
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
LifecycleManagement.session({
"app": {
"id": "SomeApp",
"url": "https://some-app.firebolt.rdkcentral.com"
},
"runtime": {
"id": "WebBrowser-1"
},
"launch": {
"inactive": true
}
})
.then(result => {
console.log(result)
})
Value of result
:
{
"appId": "SomeAppId",
"sessionId": "c0d012b4-0854-4bbc-82d5-ab52ac29dd94",
"loadedSessionId": "612f307e-8b32-412e-bcec-831779bc07ae",
"activeSessionId": "05b6f6af-c2f8-4761-beeb-6029590b8e8c",
"state": "created"
}
JSON-RPC:
Request:{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.session",
"params": {
"session": {
"app": {
"id": "SomeApp",
"url": "https://some-app.firebolt.rdkcentral.com"
},
"runtime": {
"id": "WebBrowser-1"
},
"launch": {
"inactive": true
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"appId": "SomeAppId",
"sessionId": "c0d012b4-0854-4bbc-82d5-ab52ac29dd94",
"loadedSessionId": "612f307e-8b32-412e-bcec-831779bc07ae",
"state": "created"
}
}
Start a session that results in a pending session
JavaScript:
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
LifecycleManagement.session({
"app": {
"id": "SomeApp",
"url": "https://some-app.firebolt.rdkcentral.com"
},
"runtime": {
"id": "WebBrowser-1"
},
"launch": {
"inactive": false
}
})
.then(result => {
console.log(result)
})
Value of result
:
{
"appId": "SomeAppId",
"sessionId": "c0d012b4-0854-4bbc-82d5-ab52ac29dd94",
"loadedSessionId": "612f307e-8b32-412e-bcec-831779bc07ae",
"activeSessionId": "05b6f6af-c2f8-4761-beeb-6029590b8e8c",
"state": "created"
}
JSON-RPC:
Request:{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.session",
"params": {
"session": {
"app": {
"id": "SomeApp",
"url": "https://some-app.firebolt.rdkcentral.com"
},
"runtime": {
"id": "WebBrowser-1"
},
"launch": {
"inactive": false
}
}
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"state": "pending"
}
}
${end.method}
Used by provider to update the state of an application so that the state can be emitted to apps.
function setState(appId: string, state: LifecycleState): Promise<void>
Parameters:
Param | Type | Required | Description |
---|---|---|---|
appId |
string |
true | |
state |
LifecycleState |
true |
values: 'initializing' | 'inactive' | 'foreground' | 'background' | 'unloading' | 'suspended'
|
Promise resolution:
void
Capabilities:
Role | Capability |
---|---|
manages | xrn:firebolt:capability:lifecycle:state |
Set application lifecycle state to inactive
JavaScript:
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
LifecycleManagement.setState("SomeAppId", "inactive")
.then(result => {
console.log(result)
})
Value of result
:
null
JSON-RPC:
Request:{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.setState",
"params": {
"state": "inactive",
"appId": "SomeAppId"
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
${end.method}
function listen('sessionCanceled', (object) => void): Promise<number>
See also: listen(), once(), clear().
Event value:
Property | Type | Description |
---|---|---|
appId |
string | The id of the app that this session is for |
Capabilities:
Role | Capability |
---|---|
manages | xrn:firebolt:capability:lifecycle:state |
Default Example
JavaScript:
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
LifecycleManagement.listen('sessionCanceled', canceled => {
console.log(canceled)
})
Value of canceled
:
{
"appId": "SomeAppId"
}
JSON-RPC:
Request:{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.onSessionCanceled",
"params": {
"listen": true
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"appId": "SomeAppId"
}
}
function listen('sessionCreated', (AppSession) => void): Promise<number>
See also: listen(), once(), clear().
Event value:
Capabilities:
Role | Capability |
---|---|
manages | xrn:firebolt:capability:lifecycle:state |
Default Example
JavaScript:
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
LifecycleManagement.listen('sessionCreated', created => {
console.log(created)
})
Value of created
:
{
"appId": "SomeAppId",
"sessionId": "c0d012b4-0854-4bbc-82d5-ab52ac29dd94",
"loadedSessionId": "612f307e-8b32-412e-bcec-831779bc07ae",
"activeSessionId": "05b6f6af-c2f8-4761-beeb-6029590b8e8c",
"state": "created"
}
JSON-RPC:
Request:{
"jsonrpc": "2.0",
"id": 1,
"method": "LifecycleManagement.onSessionCreated",
"params": {
"listen": true
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"appId": "SomeAppId",
"sessionId": "c0d012b4-0854-4bbc-82d5-ab52ac29dd94",
"loadedSessionId": "612f307e-8b32-412e-bcec-831779bc07ae",
"activeSessionId": "05b6f6af-c2f8-4761-beeb-6029590b8e8c",
"state": "created"
}
}
The provider interface for the xrn:firebolt:capability:lifecycle:launch
capability.
Usage:
LifecycleManagement.provide('xrn:firebolt:capability:lifecycle:launch', provider: LaunchProvider | object)
Tells the provider that an app should be launched
function launch(parameters?: LifecycleLaunchParameters, session?: ProviderSession): Promise<LifecycleLaunchResponse>
Provider methods always have two arguments:
Param | Type | Required | Summary |
---|---|---|---|
parameters |
LifecycleLaunchParameters |
false | |
session |
ProviderSession |
false |
${if.provider.params}
Parameters Property | Type | Required | Summary |
---|---|---|---|
appId |
string |
true | The application ID |
intent |
NavigationIntent |
false | A Firebolt compliant representation of a user intention to navigate to a specific place in an app. |
type LifecycleLaunchParameters = {
appId: string // The application ID
intent?: NavigationIntent // A Firebolt compliant representation of a user intention to navigate to a specific place in an app.
}
${end.if.provider.params}
Promise resolution:
Property | Type | Description |
---|---|---|
success |
boolean | Whether the launch succeeded |
Register your app to provide the xrn:firebolt:capability:lifecycle:launch
capability.
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
class MyLaunchProvider {
async launch(parameters, session) {
return await Promise.resolve({
"success": true
})
}
}
LifecycleManagement.provide('xrn:firebolt:capability:lifecycle:launch', new MyLaunchProvider())
JSON-RPC
Register to recieve each provider API
Request:
{
"id": 1,
"method": "LifecycleManagement.onRequestLaunch",
"params": {
"listen": true
}
}
Response:
{
"id": 1,
"result": {
"listening": true,
"event": "LifecycleManagement.onRequestLaunch"
}
}
Asynchronous event to initiate launch()
Event Response:
{
"id": 1,
"result": {
"correlationId": "123",
"parameters": {
"appId": "SomeAppId",
"intent": {
"action": "home",
"context": {
"source": "voice"
}
}
}
}
}
App initiated response to event
Request:
{
"id": 2,
"method": "LifecycleManagement.launchResponse",
"params": {
"correlationId": "123",
"result": {
"success": true
}
}
}
Response:
{
"id": 2,
"result": true
}
The provider interface for the xrn:firebolt:capability:lifecycle:state
capability.
Usage:
LifecycleManagement.provide('xrn:firebolt:capability:lifecycle:state', provider: StateProvider | object)
Tells the provider that an app has said they are ready
function ready(parameters?: LifecycleReadyParameters, session?: ProviderSession): Promise<void>
Provider methods always have two arguments:
Param | Type | Required | Summary |
---|---|---|---|
parameters |
LifecycleReadyParameters |
false | |
session |
ProviderSession |
false |
${if.provider.params}
Parameters Property | Type | Required | Summary |
---|---|---|---|
appId |
string |
true | The application ID |
type LifecycleReadyParameters = {
appId: string // The application ID
}
${end.if.provider.params}
Promise resolution:
void
Tells the provider that an app has requested closing itself
function close(parameters?: LifecycleCloseParameters, session?: ProviderSession): Promise<void>
Provider methods always have two arguments:
Param | Type | Required | Summary |
---|---|---|---|
parameters |
LifecycleCloseParameters |
false | |
session |
ProviderSession |
false |
${if.provider.params}
Parameters Property | Type | Required | Summary |
---|---|---|---|
appId |
string |
true | The application ID |
reason |
CloseReason |
true | The application close reason values: 'remoteButton' | 'userExit' | 'done' | 'error'
|
type LifecycleCloseParameters = {
appId: string // The application ID
reason: CloseReason // The application close reason
}
${end.if.provider.params}
Promise resolution:
void
Tells the provider that an app has said they are finished cleaning up while unloading
function finished(parameters?: LifecycleFinishedParameters, session?: ProviderSession): Promise<void>
Provider methods always have two arguments:
Param | Type | Required | Summary |
---|---|---|---|
parameters |
LifecycleFinishedParameters |
false | |
session |
ProviderSession |
false |
${if.provider.params}
Parameters Property | Type | Required | Summary |
---|---|---|---|
appId |
string |
true | The application ID |
type LifecycleFinishedParameters = {
appId: string // The application ID
}
${end.if.provider.params}
Promise resolution:
void
Register your app to provide the xrn:firebolt:capability:lifecycle:state
capability.
import { LifecycleManagement } from '@firebolt-js/ripple-rpc'
class MyStateProvider {
async ready(parameters, session) {
return await Promise.resolve(null)
}
async close(parameters, session) {
return await Promise.resolve(null)
}
async finished(parameters, session) {
return await Promise.resolve(null)
}
}
LifecycleManagement.provide('xrn:firebolt:capability:lifecycle:state', new MyStateProvider())
JSON-RPC
Register to recieve each provider API
Request:
{
"id": 1,
"method": "LifecycleManagement.onRequestReady",
"params": {
"listen": true
}
}
{
"id": 2,
"method": "LifecycleManagement.onRequestClose",
"params": {
"listen": true
}
}
{
"id": 3,
"method": "LifecycleManagement.onRequestFinished",
"params": {
"listen": true
}
}
Response:
{
"id": 1,
"result": {
"listening": true,
"event": "LifecycleManagement.onRequestReady"
}
}
{
"id": 2,
"result": {
"listening": true,
"event": "LifecycleManagement.onRequestClose"
}
}
{
"id": 3,
"result": {
"listening": true,
"event": "LifecycleManagement.onRequestFinished"
}
}
Asynchronous event to initiate ready()
Event Response:
{
"id": 1,
"result": {
"correlationId": "123",
"parameters": {
"appId": "SomeAppId"
}
}
}
App initiated response to event
Request:
{
"id": 4,
"method": "LifecycleManagement.readyResponse",
"params": {
"correlationId": "123",
"result": null
}
}
Response:
{
"id": 4,
"result": true
}
Asynchronous event to initiate close()
Event Response:
{
"id": 2,
"result": {
"correlationId": "123",
"parameters": {
"appId": "SomeAppId",
"reason": "userExit"
}
}
}
App initiated response to event
Request:
{
"id": 5,
"method": "LifecycleManagement.closeResponse",
"params": {
"correlationId": "123",
"result": null
}
}
Response:
{
"id": 5,
"result": true
}
Asynchronous event to initiate finished()
Event Response:
{
"id": 3,
"result": {
"correlationId": "123",
"parameters": {
"appId": "SomeAppId"
}
}
}
App initiated response to event
Request:
{
"id": 6,
"method": "LifecycleManagement.finishedResponse",
"params": {
"correlationId": "123",
"result": null
}
}
Response:
{
"id": 6,
"result": true
}
type AppSessionRequest = {
app: {
id: string // The identifier for the app
url?: string // The url that the app will be launched with
title?: string // The display title of the app
catalog?: string // The catalog id that this app's content metadata comes from
}
runtime?: {
id?: string // The identifier for the runtime
transport?: 'bridge' | 'websocket' // The type of transport the application container will use to communicate to Firebolt
}
launch?: {
intent?: NavigationIntent // A Firebolt compliant representation of a user intention to navigate to a specific place in an app.
secondScreen?: SecondScreenEvent // An a message notification from a second screen device
inactive?: boolean // Flag on whether or not the session is meant to remain in the inactive state for this session. This will instruct Firebolt on whether to start an activeSession. Default is false.
}
}
See also:
HomeIntent | LaunchIntent | EntityIntent | PlaybackIntent | SearchIntent | SectionIntent | TuneIntent SecondScreenEvent
type AppSession = {
appId: string // The id of the app that this session is for
sessionId: string // An id representing the the app's gateway access to Firebolt for this loaded session. This sessionId can be used by the application to connect via websocket to Firebolt.
loadedSessionId: string // The sessionId scoped to the app loaded in any state. Firebolt should clear this sessionId whenever the app moves to unloading state.
activeSessionId?: string // The sessionId scoped to the current active session. Firebolt should clear this sessionId whenever the app moves to the inactive state. Firebolt should generate a new one anytime the app moves from inactive to active. This may be undefined for any inactive sessions.
state: "created"
}
type LifecycleLaunchResponse = {
success: boolean // Whether the launch succeeded
}
type LifecycleLaunchRequest = {
parameters: LifecycleLaunchParameters
}
See also:
type LifecycleReadyRequest = {
parameters: LifecycleReadyParameters
}
See also:
type LifecycleCloseRequest = {
parameters: LifecycleCloseParameters
}
See also:
type LifecycleFinishedRequest = {
parameters: LifecycleFinishedParameters
}
See also:
An a message notification from a second screen device
type SecondScreenEvent = {
type: 'dial'
version?: string
data?: string
}
type LifecycleLaunchParameters = {
appId: string // The application ID
intent?: NavigationIntent // A Firebolt compliant representation of a user intention to navigate to a specific place in an app.
}
See also:
HomeIntent | LaunchIntent | EntityIntent | PlaybackIntent | SearchIntent | SectionIntent | TuneIntent
type LifecycleReadyParameters = {
appId: string // The application ID
}
type LifecycleCloseParameters = {
appId: string // The application ID
reason: CloseReason // The application close reason
}
See also:
'remoteButton' | 'userExit' | 'done' | 'error'
type LifecycleFinishedParameters = {
appId: string // The application ID
}