Version: 1.0.0
A LifecycleManager plugin for Thunder framework.
The LifecycleManager plugin provides an interface for LifecycleManager.
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].
The table below lists configuration options of the plugin.
| Name | Type | Description |
|---|---|---|
| callsign | string | Plugin instance name (default: org.rdk.LifecycleManager) |
| classname | string | Class name: LifecycleManager |
| locator | string | Library name: libWPEFrameworkLifecycleManager.so |
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |
The following methods are provided by the LifecycleManager plugin:
LifecycleManager interface methods:
| Method | Description |
|---|---|
| appReady | Response api call to appInitializing API |
| closeApp | close the app |
| stateChangeComplete | Response api call to appLifecycleStateChanged API |
Response api call to appInitializing API
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.appId | string |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 0,
"method": "org.rdk.LifecycleManager.appReady",
"params": {
"appId": ""
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.LifecycleManager.appReady", "params": {"appId": ""}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 0,
"result": null
}close the app
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.appId | string | |
| params.closeReason | string | closed reason for application |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 1,
"method": "org.rdk.LifecycleManager.closeApp",
"params": {
"appId": "",
"closeReason": "USER_EXIT"
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.LifecycleManager.closeApp", "params": {"appId": "", "closeReason": "USER_EXIT"}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 1,
"result": null
}Response api call to appLifecycleStateChanged API
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.appId | string | |
| params.stateChangedId | integer | state changed identifier |
| params.success | bool |
| Name | Type | Description |
|---|---|---|
| result | null | On success null will be returned. |
{
"jsonrpc": 2.0,
"id": 2,
"method": "org.rdk.LifecycleManager.stateChangeComplete",
"params": {
"appId": "",
"stateChangedId": 0,
"success": true
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.LifecycleManager.stateChangeComplete", "params": {"appId": "", "stateChangedId": 0, "success": true}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 2,
"result": null
}Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.
The following events are provided by the LifecycleManager plugin:
LifecycleManager interface events:
| Event | Description |
|---|---|
| onAppLifecycleStateChanged | Notifies the new state |
Notifies the new state
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.appId | string | |
| params.appInstanceId | string | |
| params.oldLifecycleState | LifecycleState | The previous state of the application instance before the update. |
| params.newLifecycleState | LifecycleState | The new state to transition the application. |
| params.navigationIntent | string | navigation intent during active state |
{
"jsonrpc": 2.0,
"id": 3,
"method": "org.rdk.LifecycleManager.onAppLifecycleStateChanged",
"params": {
"appId": "",
"appInstanceId": "",
"oldLifecycleState": "",
"newLifecycleState": "",
"navigationIntent": ""
}
}