Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
CreateWindow

CreateWindow Class Reference

Constructors

Instance Methods

Constructors

new CreateWindow(parameters)

Initializes an instance of CreateWindow.

Instance Methods

createWindow.getAssociatedServiceType() ⇒ String

Get the AssociatedServiceType

Kind: Instance method of CreateWindow
Returns: String - the KEY_ASSOCIATED_SERVICE_TYPE value

createWindow.getDuplicateUpdatesFromWindowID() ⇒ Number

Get the DuplicateUpdatesFromWindowID

Kind: Instance method of CreateWindow
Returns: Number - the KEY_DUPLICATE_UPDATES_FROM_WINDOW_ID value

createWindow.getType() ⇒ WindowType

Get the Type

Kind: Instance method of CreateWindow
Returns: WindowType - the KEY_TYPE value

createWindow.getWindowID() ⇒ Number

Get the WindowID

Kind: Instance method of CreateWindow
Returns: Number - the KEY_WINDOW_ID value

createWindow.getWindowName() ⇒ String

Get the WindowName

Kind: Instance method of CreateWindow
Returns: String - the KEY_WINDOW_NAME value

createWindow.setAssociatedServiceType(type) ⇒ CreateWindow

Set the AssociatedServiceType

Kind: Instance method of CreateWindow
Returns: CreateWindow - The class instance for method chaining.

ParamTypeDescription
type String Allows an app to create a widget related to a specific service type. As an example if a `MEDIA` app becomes active, this app becomes audible and is allowed to play audio. Actions such as skip or play/pause will be directed to this active media app. In case of widgets, the system can provide a single "media" widget which will act as a placeholder for the active media app. It is only allowed to have one window per service type. This means that a media app can only have a single MEDIA widget. Still the app can create widgets omitting this parameter. Those widgets would be available as app specific widgets that are permanently included in the HMI. This parameter is related to widgets only. The default main window, which is pre-created during app registration, will be created based on the HMI types specified in the app registration request. - The desired AssociatedServiceType. {'string_min_length': 1}

createWindow.setDuplicateUpdatesFromWindowID(id) ⇒ CreateWindow

Set the DuplicateUpdatesFromWindowID

Kind: Instance method of CreateWindow
Returns: CreateWindow - The class instance for method chaining.

ParamTypeDescription
id Number Optional parameter. Specify whether the content sent to an existing window should be duplicated to the created window. If there isn't a window with the ID, the request will be rejected with `INVALID_DATA`. - The desired DuplicateUpdatesFromWindowID.

createWindow.setType(type) ⇒ CreateWindow

Set the Type

Kind: Instance method of CreateWindow
Returns: CreateWindow - The class instance for method chaining.

ParamTypeDescription
type WindowType The type of the window to be created. Main window or widget. - The desired Type.

createWindow.setWindowID(id) ⇒ CreateWindow

Set the WindowID

Kind: Instance method of CreateWindow
Returns: CreateWindow - The class instance for method chaining.

ParamTypeDescription
id Number A unique ID to identify the window. The value of '0' will always be the default main window on the main display and should not be used in this context as it will already be created for the app. See PredefinedWindows enum. Creating a window with an ID that is already in use will be rejected with `INVALID_ID`. - The desired WindowID.

createWindow.setWindowName(name) ⇒ CreateWindow

Set the WindowName

Kind: Instance method of CreateWindow
Returns: CreateWindow - The class instance for method chaining.

ParamTypeDescription
name String The window name to be used by the HMI. The name of the pre-created default window will match the app name. Multiple apps can share the same window name except for the default main window. Creating a window with a name which is already in use by the app will result in `DUPLICATE_NAME`. - The desired WindowName. {'string_min_length': 1, 'string_max_length': 100}
View on GitHub.com
Previous Section Next Section