This API will be available at the beginning of 2025. Please check back later for updates.

Introduction

App Control enables seamless integration of deep-linking and app control functions for partners. This documentation outlines the method’s syntax, parameters, and behavior for launching applications on Titan OS.

Syntax

TitanOS.launchApp(code: string, query?:string): Promise<void>

Parameters

  • code (string, required): The universal identifier of the application to be launched. Example: netflix, primevideo, youtube, etc.
  • query (string, optional): A deeplink or query string unique to each app, passed to the application upon launching. This can be used to navigate to specific content within the app.

Behavior

  1. Application Validation: With the App code, we validate if the app exists and is available in the user’s current country market and TV model.
  2. Launching the Application:
    • Success: If the application is valid and available, it is launched with the optional query. The promise resolves successfully.
    • Failure: If the application is not valid or unavailable, the promise is rejected with a specific error code.

Error Handling

The promise may be rejected with an error object containing:

  • code (string): A machine-readable error code indicating the type of error.
  • message (string): A human-readable message providing more details about the error.

Error Codes

  • APP_NOT_FOUND: The application specified by code does not exist.

Example Usage

// Launching an app without query
TitanOS.launchApp("netflix")
  .then(() => {
    console.log("Netflix launched successfully.");
  })
  .catch((error) => {
    console.error(`Error (${error.code}): ${error.message}`);
  });

// Launching an app with query or deeplink
TitanOS.launchApp("youtube", "https://youtu.be/dQw4w9WgXcQ")
  .then(() => {
    console.log("YouTube launched with the specified video.");
  })
  .catch((error) => {
    console.error(`Error (${error.code}): ${error.message}`);
  });