Launcher
The Launcher capability protocol serves to define the methods required for normalizing the launching of apps. It allows for in-built support for certain common launch types (deep-linking to YouTube, Netflix, Hulu, browser, etc) as well as by (platform-specific) app id.
Methods
- launcher.launchApp (appId)
Launch an application on the device.
On success, the success event/callback will be fired with the arguments (launchSession)
launchSession: LaunchSession
Related capabilities:
Launcher.App
Parameters:
appId (string) – ID of the application
Returns: Command
- launcher.closeApp (appId)
Close an application on the device.
Related capabilities:
Launcher.App.Close
Parameters:
appId (string)
Returns: Command
- launcher.launchAppStore (appId)
Launch the device’s app store app, optionally deep-linked to a specific app’s page.
On success, the success event/callback will be fired with the arguments (launchSession)
launchSession: LaunchSession
Related capabilities:
Launcher.AppStoreLauncher.AppStore.Params
Parameters:
appId (string) – (optional) ID of the application to show in the app store
Returns: Command
- launcher.launchBrowser (url)
Launch the web browser. Will launch deep-linked to provided URL, if supported on the target platform.
On success, the success event/callback will be fired with the arguments (launchSession)
launchSession: LaunchSession
Related capabilities:
Launcher.BrowserLauncher.Browser.Params– if launching with url
Parameters:
url (string)
Returns: Command
- launcher.launchHulu (contentId)
Launch Hulu app. Will launch deep-linked to provided contentId, if supported on the target platform.
On success, the success event/callback will be fired with the arguments (launchSession)
launchSession: LaunchSession
Related capabilities:
Launcher.HuluLauncher.Hulu.Params– if launching with contentId
Parameters:
contentId (string) – Video id to open
Returns: Command
- launcher.launchNetflix (contentId)
Launch Netflix app. Will launch deep-linked to provided contentId, if supported on the target platform.
On success, the success event/callback will be fired with the arguments (launchSession)
launchSession: LaunchSession
Related capabilities:
Launcher.NetflixLauncher.Netflix.Params– if launching with contentId
Parameters:
contentId (string) – Video id to open
Returns: Command
- launcher.launchYouTube (contentId)
Launch YouTube app. Will launch deep-linked to provided contentId, if supported on the target platform.
On success, the success event/callback will be fired with the arguments (launchSession)
launchSession: LaunchSession
Related capabilities:
Launcher.YouTubeLauncher.YouTube.Params– if launching with contentId
Parameters:
contentId (string) – Video id to open
Returns: Command
- launcher.getAppList ()
Gets a list of all apps installed on the device.
On success, the success event/callback will be fired with the arguments (appList)
appList: AppInfo[] – Each AppInfo object contains:
id (string): platform-specific appId
name (string): human-readable name of app
Related capabilities:
Launcher.App.List
Returns: Command