/* * 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 androidx.annotation.NonNull; import com.smartdevicelink.protocol.enums.FunctionID; import com.smartdevicelink.proxy.RPCRequest; import com.smartdevicelink.proxy.rpc.enums.AppHMIType; import com.smartdevicelink.proxy.rpc.enums.Language; import com.smartdevicelink.util.Version; import java.util.Hashtable; import java.util.List; /** * Registers the application's interface with SDL®, declaring properties of * the registration, including the messaging interface version, the app name, * etc. The mobile application must establish its interface registration with * SDL® before any other interaction with SDL® can take place. The * registration lasts until it is terminated either by the application calling * the {@linkplain UnregisterAppInterface} method, or by SDL® * sending an {@linkplain OnAppInterfaceUnregistered} notification, or * by loss of the underlying transport connection, or closing of the underlying * message transmission protocol RPC session *
* Until the application receives its first {@linkplain OnHMIStatus} * Notification, its HMI Status is assumed to be: * {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel}=NONE, * {@linkplain com.smartdevicelink.proxy.rpc.enums.AudioStreamingState} * =NOT_AUDIBLE, * {@linkplain com.smartdevicelink.proxy.rpc.enums.SystemContext}=MAIN * * All SDL® resources which the application creates or uses (e.g. Choice * Sets, Command Menu, etc.) are associated with the application's interface * registration. Therefore, when the interface registration ends, the SDL® * resources associated with the application are disposed of. As a result, even * though the application itself may continue to run on its host platform (e.g. * mobile device) after the interface registration terminates, the application * will not be able to use the SDL® HMI without first establishing a new * interface registration and re-creating its required SDL® resources. That * is, SDL® resources created by (or on behalf of) an application do not * persist beyond the life-span of the interface registration * * Resources and settings whose lifespan is tied to the duration of an * application's interface registration: *HMILevel is not defined before registering
* * *Parameter List
*Name | *Type | *Description | *Reg. | *Notes | *Version | *
---|---|---|---|---|---|
MsgVersion | *MsgVersion | *Declares what version of the SDL interface the application expects to use with SDL | *Y | *To be compatible, app msg major version number must be less than or equal to SDL major version number. If msg versions are incompatible, app has 20 seconds to attempt successful RegisterAppInterface (w.r.t. msg version) on underlying protocol session, else will be terminated. Major version number is a compatibility declaration. Minor version number indicates minor functional variations (e.g. features, capabilities, bug fixes) when sent from SDL to app (in RegisterAppInterface response). However, the minor version number sent from the app to SDL (in RegisterAppInterface request) is ignored by SDL. |
* SmartDeviceLink 1.0 | *
appName | *String | *The mobile application's name. This name is displayed in the SDL Mobile Applications menu. It also serves as the unique identifier of the application for SDL . | *Y | *Must be 1-100 characters in length. Must consist of following characters: May not be the same (by case insensitive comparison) as the name or any synonym of any currently registered application. |
* SmartDeviceLink 1.0 | *
ttsName | *TTSChunk | *TTS string for VR recognition of the mobile application name. Meant to overcome any failing on speech engine in properly pronouncing / understanding app name. | *N | *Size must be 1-100 Needs to be unique over all applications. May not be empty. May not start with a new line character. |
* SmartDeviceLink 2.0 | *
ngnMediaScreenAppName | *String | *Provides an abbreviated version of the app name (if necessary) that will be displayed on the NGN media screen. | *N | *- Must be 1-5 characters. If not provided, value will be derived from appName truncated to 5 characters. | *SmartDeviceLink 1.0 | *
vrSynonyms | *String | *An array of 1-100 elements, each element containing a voice-recognition synonym by which this app can be called when being addressed in the mobile applications menu. | *N | *Each vr synonym is limited to 40 characters, and there can be 1-100 synonyms in array. May not be the same (by case insensitive comparison) as the name or any synonym of any currently-registered application. | *SmartDeviceLink 1.0 | *
isMediaApplication | *Boolean | *Indicates that the application will be streaming audio to SDL (via A2DP) that is audible outside of the BT media source. | *Y | ** | SmartDeviceLink 1.0 | *
languageDesired | *Language | *An enumeration indicating what language the application intends to use for user interaction (Display, TTS and VR). | *Y | *If the language indicated does not match the active language on SDL, the interface registration will be rejected.If the user changes the SDL language while this interface registration is active, the interface registration will be terminated. | *SmartDeviceLink 1.0 | *
hmiDisplayLanguageDesired | *Language | *An enumeration indicating what language the application intends to use for user interaction ( Display). | *Y | ** | SmartDeviceLink 2.0 | *
appHMIType | *AppHMIType | *List of all applicable app types stating which classifications to be given to the app.e.g. for platforms , like GEN2, this will determine which "corner(s)" the app can populate | *N | *Array Minsize: 1; Array Maxsize: 100 | *SmartDeviceLink 2.0 | *
hashID | *String | *ID used to uniquely identify current state of all app data that can persist through connection cycles (e.g. ignition cycles).This registered data (commands, submenus, choice sets, etc.) can be reestablished without needing to explicitly reregister each piece. If omitted, then the previous state of an app's commands, etc. will not be restored.When sending hashID, all RegisterAppInterface parameters should still be provided (e.g. ttsName, etc.). | *N | *maxlength:100 | *SmartDeviceLink 2.3.1 | *
deviceInfo | *DeviceInfo | *Various information abount connecting device. | *N | ** | SmartDeviceLink 2.3.1 | *
appID | *String | *ID used to validate app with policy table entries | *Y | *Maxlength: 100 | *SmartDeviceLink 2.0 | *
fullAppID | *String | *ID used to validate app with policy table entries | *N | *Maxlength: 100 | *SmartDeviceLink 5.0 | *
hmiCapabilities | *HMICapabilities | *Specifies the HMI capabilities. | *N | ** | SmartDeviceLink 2.3.2.2 | *
sdlVersion | *String | *The SmartDeviceLink version. | *N | *Maxlength: 100 | *SmartDeviceLink 2.3.2.2 | *
systemSoftwareVersion | *String | *The software version of the system that implements the SmartDeviceLink core. | *N | *Maxlength: 100 | *SmartDeviceLink 2.3.2.2 | *
dayColorScheme | *TemplateColorScheme | *The color scheme that is used for day. | *N | ** | SmartDeviceLink 5.0 | *
nightColorScheme | *TemplateColorScheme | *The color scheme that is used for night. | *N | ** | SmartDeviceLink 5.0 | *