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
JavaEE Documentation
CreateWindow

Class CreateWindow

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage
             com.smartdevicelink.proxy.RPCRequest

Package
com.smartdevicelink.proxy.rpc

Overview

The RPC CreateWindow allows an app to create a new window on the display. The app needs to specify a window ID that is used for window manipulation e.g. with the RPC Show and the window type which can either be MAIN or WIDGET (see sub-section Window types).

Fields

KEY_WINDOW_ID

public static final java.lang.String KEY_WINDOW_ID
Constant Value
"windowID"

KEY_WINDOW_NAME

public static final java.lang.String KEY_WINDOW_NAME
Constant Value
"windowName"

KEY_TYPE

public static final java.lang.String KEY_TYPE
Constant Value
"type"

KEY_ASSOCIATED_SERVICE_TYPE

public static final java.lang.String KEY_ASSOCIATED_SERVICE_TYPE
Constant Value
"associatedServiceType"

KEY_DUPLICATE_UPDATES_FROM_WINDOW_ID

public static final java.lang.String KEY_DUPLICATE_UPDATES_FROM_WINDOW_ID
Constant Value
"duplicateUpdatesFromWindowID"

Inherited Fields

From Class Fields
com.smartdevicelink.proxy.RPCRequest onResponseListener
com.smartdevicelink.proxy.RPCMessage KEY_REQUEST, KEY_RESPONSE, KEY_NOTIFICATION, KEY_FUNCTION_NAME, KEY_PARAMETERS, KEY_CORRELATION_ID, messageType, parameters, function
com.smartdevicelink.proxy.RPCStruct KEY_BULK_DATA, KEY_PROTECTED, store

Constructors

CreateWindow()

Constructs a new CreateWindow object

public CreateWindow()

CreateWindow( java.util.Hashtable<java.lang.String, java.lang.Object> hash )

Constructs a new CreateWindow object indicated by the Hashtable parameter

public CreateWindow(java.util.Hashtable<java.lang.String, java.lang.Object> hash)

Constructor Parameters

hash
The Hashtable to use

CreateWindow( Integer windowID, String windowName, WindowType type )

Constructs a new CreateWindow object

public CreateWindow(Integer windowID,String windowName,WindowType type)

Constructor Parameters

windowID
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`.
windowName
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. {@code windowName.length() <= 100}
type
The type of the window to be created. Main window or widget.

Methods

setWindowID( Integer windowID )

Sets the windowID. It's 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`.

public com.smartdevicelink.proxy.rpc.CreateWindow setWindowID(Integer windowID)

Method Parameters

windowID
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`.

getWindowID()

Gets the windowID.

public java.lang.Integer getWindowID()

setWindowName( String windowName )

Sets a 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`.

public com.smartdevicelink.proxy.rpc.CreateWindow setWindowName(String windowName)

Method Parameters

windowName
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. {@code windowName.length() <= 100}

getWindowName()

Gets a window name to be used by the HMI.

public java.lang.String getWindowName()

setType( WindowType type )

Sets the type of the window to be created. Main window or widget.

public com.smartdevicelink.proxy.rpc.CreateWindow setType(WindowType type)

Method Parameters

type
The type of the window to be created. Main window or widget.

getType()

Gets a WindowType value

public com.smartdevicelink.proxy.rpc.enums.WindowType getType()

setAssociatedServiceType( String associatedServiceType )

Sets the associatedServiceType. It 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.

public com.smartdevicelink.proxy.rpc.CreateWindow setAssociatedServiceType(String associatedServiceType)

Method Parameters

associatedServiceType
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.

getAssociatedServiceType()

Gets the associatedServiceType.

public java.lang.String getAssociatedServiceType()

setDuplicateUpdatesFromWindowID( Integer duplicateUpdatesFromWindowID )

Sets the duplicateUpdatesFromWindowID. Its a 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`.

public com.smartdevicelink.proxy.rpc.CreateWindow setDuplicateUpdatesFromWindowID(Integer duplicateUpdatesFromWindowID)

Method Parameters

duplicateUpdatesFromWindowID
Specify whether the content sent to an existing window should be duplicated to the created window.

getDuplicateUpdatesFromWindowID()

Gets the duplicateUpdatesFromWindowID.

public java.lang.Integer getDuplicateUpdatesFromWindowID()

Inherited Methods

From Class Methods
com.smartdevicelink.proxy.RPCRequest getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener
com.smartdevicelink.proxy.RPCMessage getFunctionID, getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong
com.smartdevicelink.proxy.RPCStruct getStoreValue, getStore, deserializeJSON, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong, clone, equals, hashCode
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section