App Control enables your application on Titan OS to launch other applications and, optionally, direct them to specific content (deeplink). This functionality is now fully integrated with the Titan SDK. This feature is protected and requires your app to be whitelisted. Please, send an e-mail to titan-sdk-support@titanos.tv asking your app to be authorized.

How to use it

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

Code parameter

The universal identifier of the application to be launched. Example: netflix, primevideo, youtube, etc. You can find these codes in the Partner Portal under the Resources -> App Control section.

Query parameter

The query parameter is a set of information appended to an app launch command. It allows you to:
  • Send data to the target application
  • Open a specific video, detail page or a user profile.
Important: The format and usage of these query parameters are defined by the application you are trying to open, not by Titan OS. Titan OS only handles launching the application and passing these parameters. For example, to open a specific movie on Netflix or a video on YouTube, you’ll need to use the deeplink format that those applications themselves recognize.

Error Handling

The promise may be rejected with an error object containing:
  • code (string): A machine-readable error code indicating the type of error. Currently there’s only one code already mapped: APP_NOT_FOUND - The application specified by code does not exist
  • message (string): A human-readable message providing more details about the error.
Important: With the App code, we validate if the app exists and is available in the user’s current country market and TV model. 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.

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}`);
  });