/* * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following * disclaimer in the documentation and/or other materials provided with the * distribution. * * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package com.smartdevicelink.proxy.rpc; import com.smartdevicelink.protocol.enums.FunctionID; import com.smartdevicelink.proxy.RPCRequest; import com.smartdevicelink.proxy.rpc.enums.TextAlignment; import java.util.Hashtable; import java.util.List; /** * Updates the application's display text area, regardless of whether or not * this text area is visible to the user at the time of the request. The * application's display text area remains unchanged until updated by subsequent * calls to Show *
* The content of the application's display text area is visible to the user * when the application's {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel} * is FULL or LIMITED, and the * {@linkplain com.smartdevicelink.proxy.rpc.enums.SystemContext}=MAIN and no * {@linkplain Alert} is in progress * * The Show operation cannot be used to create an animated scrolling screen. To * avoid distracting the driver, Show commands cannot be issued more than once * every 4 seconds. Requests made more frequently than this will be rejected * *HMILevel needs to be FULL, LIMITED or BACKGROUND
* *Parameter List
*Param Name | *Type | *Description | *Req. | *Notes | *Version Available | *
---|---|---|---|---|---|
mainField1 | *String | *Text to be displayed in a single-line display, or in the upper display line in a two-line display. | *N | *If this parameter is omitted, the text of mainField1 does not change. If this parameter is an empty string, the field will be cleared. Maxlength = 500 |
* SmartDeviceLink 1.0 | *
mainField2 | *String | *Text to be displayed on the second display line of a two-line display. | *N | *If this parameter is omitted, the text of mainField2 does not change. If this parameter is an empty string, the field will be cleared. If provided and the display is a single-line display, the parameter is ignored. Maxlength = 500 |
* SmartDeviceLink 1.0 | *
mainField3 | *String | *Text to be displayed on the first display line of the second page. | *N | *If this parameter is omitted, the text of mainField3 does not change. If this parameter is an empty string, the field will be cleared. If provided and the display is a single-line display, the parameter is ignored. Maxlength = 500 |
* SmartDeviceLink 2.0 | *
mainField4 | *String | *Text to be displayed on the second display line of the second page. | *N | *If this parameter is omitted, the text of mainField4 does not change. If this parameter is an empty string, the field will be cleared. If provided and the display is a single-line display, the parameter is ignored. Maxlength = 500 |
* SmartDeviceLink 2.0 | *
alignment | *TextAlignment | *Specifies how mainField1 and mainField2 text should be aligned on display. | *N | *Applies only to mainField1 and mainField2 provided on this call, not to what is already showing in display. If this parameter is omitted, text in both mainField1 and mainField2 will be centered. Has no effect with navigation display |
* SmartDeviceLink 1.0 | *
statusBar | *String | *The text is placed in the status bar area. | *N | *Note: The status bar only exists on navigation displays If this parameter is omitted, the status bar text will remain unchanged. If this parameter is an empty string, the field will be cleared. If provided and the display has no status bar, this parameter is ignored. Maxlength = 500 |
* SmartDeviceLink 1.0 | *
mediaClock | *String | *Text value for MediaClock field. Has to be properly formatted by Mobile App according to SDL capabilities. If this text is set, any automatic media clock updates previously set with SetMediaClockTimer will be stopped. |
* N | *Must be properly formatted as described in the MediaClockFormat enumeration. If a value of five spaces is provided, this will clear that field on the display (i.e. the media clock timer field will not display anything) Maxlength = 500 |
* SmartDeviceLink 1.0 | *
mediaTrack | *String | *Array of one or more TTSChunk elements specifying the help prompt used in an interaction started by PTT. | *N | *If parameter is omitted, the track field remains unchanged. If an empty string is provided, the field will be cleared. This field is only valid for media applications on navigation displays. Maxlength = 500 |
* SmartDeviceLink 1.0 | *
graphic | *Image | *Image to be shown on supported displays. | *N | *If omitted on supported displays, the displayed graphic shall not change. | *SmartDeviceLink 2.0 | *
secondaryGraphic | *Image | * Image struct determining whether static or dynamic secondary image to display in app. If omitted on supported displays, the displayed secondary graphic shall not change. |
* N | ** | SmartDeviceLink 2.3.2 | *
softButtons | *SoftButton | *Soft buttons as defined by the App | *N | *If omitted on supported displays, the currently displayed SoftButton values will not change. Array Minsize: 0; Array Maxsize: 8 |
* SmartDeviceLink 2.0 | *
customPresets | *String | *Custom presets as defined by the App. | *N | *If omitted on supported displays, the presets will be shown as not defined. Minsize: 0; Maxsize: 6 |
* SmartDeviceLink 2.0 | *
templateTitle | *String | *The title of the new template that will be displayed. | *How this will be displayed is dependent on the OEM design and implementation of the template.. Minsize: 0; Maxsize: 100 |
* N | *SmartDeviceLink 6.0.0 | *
Response
* *Non-default Result Codes:
*SUCCESS
*INVALID_DATA
*OUT_OF_MEMORY
*TOO_MANY_PENDING_REQUESTS
*APPLICATION_NOT_REGISTERED
*GENERIC_ERROR
*REJECTED
*DISALLOWED
*UNSUPPORTED_RESOURCE
*ABORTED
* * @since SmartDeviceLink 1.0 * @see Alert * @see SetMediaClockTimer */ public class Show extends RPCRequest { public static final String KEY_GRAPHIC = "graphic"; public static final String KEY_CUSTOM_PRESETS = "customPresets"; public static final String KEY_MAIN_FIELD_1 = "mainField1"; public static final String KEY_MAIN_FIELD_2 = "mainField2"; public static final String KEY_MAIN_FIELD_3 = "mainField3"; public static final String KEY_MAIN_FIELD_4 = "mainField4"; public static final String KEY_STATUS_BAR = "statusBar"; @Deprecated public static final String KEY_MEDIA_CLOCK = "mediaClock"; public static final String KEY_ALIGNMENT = "alignment"; public static final String KEY_MEDIA_TRACK = "mediaTrack"; public static final String KEY_SECONDARY_GRAPHIC = "secondaryGraphic"; public static final String KEY_SOFT_BUTTONS = "softButtons"; public static final String KEY_METADATA_TAGS = "metadataTags"; public static final String KEY_WINDOW_ID = "windowID"; public static final String KEY_TEMPLATE_CONFIGURATION = "templateConfiguration"; public static final String KEY_TEMPLATE_TITLE = "templateTitle"; /** * Constructs a new Show object */ public Show() { super(FunctionID.SHOW.toString()); } /** * Constructs a new Show object indicated by the Hashtable parameter * * * @param hash * The Hashtable to use */ public Show(Hashtable