Methods

Using the method call/return commands a device and an app can communicate with each other via the Engine. The Engine also supports method calls in this manner. This section outlines the existing method calls that can be made.

TV App Launching Method

The app lauching method allows devices to launch an app. This call is handled by the Container app (dock) and not available to apps.

Device Request:

CALL|widgetlaunch|null|{
  "widget_id": <tv_app_id>, 
  "payload": <payload>, 
  "install_widget": <install_tv_app>, 
  "minimum_version": <minimum_version>
}|<unique_call_id>|END

The app launch message payload contains the TV App ID and data for an app (formerly called widget) to launch and is a JSON string.

  • <tv_app_id>: The String TV App ID of the target app.
  • <payload>: The optional String or Object payload to be passed to the app upon its launch.
  • <install_tv_app>: The optional Boolean to direct the Engine to install the app if needed. The default value is true to install the app. If false the Engine will not install the app if it is not already installed.
  • <minimum_version>: The optional String representing the app's minimum version to be installed.
  • <unique_call_id>: The unique identifier of the method call, used to match the return results and support multiple simultaneous calls.

Example:

Engine Response:

RETURN|widgetlaunch|null|{
  "widget_id": <tv_app_id>, 
  "status": <status>, 
  "message": <message>
}|<unique_call_id>|END 

The app launch message result contains the TV App ID and status of the app launch and is a JSON string.

  • <tv_app_id>: The String TV App ID of the responding app.
  • <status>: The String status of the launch method. The status can be installing, launched, or failed.
    • installing: The app is in the process of being installed.
    • launched: The app has been successfully launched.
    • failed: The app failed to launch. The reason for the failure to launch is optionally available in the <message> property.
  • <message>: The optional String message containing the reason for the failure to launch.
  • <unique_call_id>: The unique identifier of the method call, used to match the return results and support multiple simultaneous calls.

Example:

Table of Contents