public class OnHMIStatus extends RPCNotification
Notifies an application that HMI conditions have changed for the application. This indicates whether the application can speak phrases, display text, perform interactions, receive button presses and events, stream audio, etc. This notification will be sent to the application when there has been a change in any one or several of the indicated states (HMILevel, AudioStreamingState or SystemContext) for the application
All three values are, in principle, independent of each other (though there may be some relationships). A value for one parameter should not be interpreted from the value of another parameter.
There are no guarantees about the timeliness or latency of the OnHMIStatus notification. Therefore, for example, information such as AudioStreamingState may not indicate that the audio stream became inaudible to the user exactly when the OnHMIStatus notification was received.
Parameter List:
| Name | Type | Description | SmartDeviceLink Ver Available |
|---|---|---|---|
| hmiLevel | HMILevel | The current HMI Level in effect for the application. | SmartDeviceLink 1.0 |
| audioStreamingState | AudioStreamingState | Current state of audio streaming for the application. When this parameter has a value of NOT_AUDIBLE, the application must stop streaming audio to SDL. Informs app whether any currently streaming audio is audible to user (AUDIBLE) or not (NOT_AUDIBLE). A value of NOT_AUDIBLE means that either the application's audio will not be audible to the user, or that the application's audio should not be audible to the user (i.e. some other application on the mobile device may be streaming audio and the application's audio would be blended with that other audio). | SmartDeviceLink 1.0 |
| videoStreamingState | VideoStreamingState | If it is NOT_STREAMABLE, the app must stop streaming video to SDL Core(stop service). | SmartDeviceLink 5.0 |
| systemContext | SystemContext | Indicates that a user-initiated interaction is in-progress (VRSESSION or MENU), or not (MAIN) | SmartDeviceLink 1.0 |
RegisterAppInterface| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_AUDIO_STREAMING_STATE |
static String |
KEY_HMI_LEVEL |
static String |
KEY_SYSTEM_CONTEXT |
static String |
KEY_VIDEO_STREAMING_STATE |
static String |
KEY_WINDOW_ID |
function, KEY_CORRELATION_ID, KEY_FUNCTION_NAME, KEY_NOTIFICATION, KEY_PARAMETERS, KEY_REQUEST, KEY_RESPONSE, messageType, parametersKEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
OnHMIStatus()
Constructs a newly allocated OnHMIStatus object
|
OnHMIStatus(Hashtable<String,Object> hash)
Constructs a newly allocated OnHMIStatus object indicated by the Hashtable parameter
|
OnHMIStatus(HMILevel hmiLevel,
AudioStreamingState audioStreamingState,
SystemContext systemContext)
Constructs a newly allocated OnHMIStatus object
|
| Modifier and Type | Method and Description |
|---|---|
void |
format(Version rpcVersion,
boolean formatParams)
This method should clean the the RPC to make sure it is compliant with the spec.
|
AudioStreamingState |
getAudioStreamingState()
Get current state of audio streaming for the application
|
Boolean |
getFirstRun()
Query whether it's the first run
|
HMILevel |
getHmiLevel()
Get HMILevel in effect for the application
|
SystemContext |
getSystemContext()
Get the System Context
|
VideoStreamingState |
getVideoStreamingState()
Get current state of video streaming for the application
|
Integer |
getWindowID()
Get the windowID value
|
OnHMIStatus |
setAudioStreamingState(AudioStreamingState audioStreamingState)
Set the audio streaming state
|
OnHMIStatus |
setFirstRun(Boolean firstRun)
Set the firstRun value
|
OnHMIStatus |
setHmiLevel(HMILevel hmiLevel)
Set the HMILevel of OnHMIStatus
|
OnHMIStatus |
setSystemContext(SystemContext systemContext)
Set the System Context of OnHMIStatus
|
OnHMIStatus |
setVideoStreamingState(VideoStreamingState videoStreamingState)
Set the video streaming state
|
OnHMIStatus |
setWindowID(Integer windowID)
Set the windowID value
|
getBoolean, getDouble, getFloat, getFunctionID, getFunctionName, getInteger, getLong, getMessageType, getObject, getParameters, getString, setFunctionName, setParametersclone, deserializeJSON, equals, formatObject, getBulkData, getMessageTypeName, getStore, getStoreValue, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_AUDIO_STREAMING_STATE
public static final String KEY_VIDEO_STREAMING_STATE
public static final String KEY_SYSTEM_CONTEXT
public static final String KEY_HMI_LEVEL
public static final String KEY_WINDOW_ID
public OnHMIStatus()
public OnHMIStatus(Hashtable<String,Object> hash)
Constructs a newly allocated OnHMIStatus object indicated by the Hashtable parameter
hash - The Hashtable to usepublic OnHMIStatus(@NonNull
HMILevel hmiLevel,
@NonNull
AudioStreamingState audioStreamingState,
@NonNull
SystemContext systemContext)
hmiLevel - the HMILevel to setaudioStreamingState - the state of audio streaming of the applicationsystemContext - Indicates that a user-initiated interaction is in-progresspublic void format(Version rpcVersion, boolean formatParams)
RPCStructpublic HMILevel getHmiLevel()
Get HMILevel in effect for the application
public OnHMIStatus setHmiLevel(@NonNull HMILevel hmiLevel)
Set the HMILevel of OnHMIStatus
hmiLevel - the HMILevel to setpublic AudioStreamingState getAudioStreamingState()
Get current state of audio streaming for the application
public OnHMIStatus setAudioStreamingState(@NonNull AudioStreamingState audioStreamingState)
Set the audio streaming state
audioStreamingState - the state of audio streaming of the applicationpublic VideoStreamingState getVideoStreamingState()
Get current state of video streaming for the application
public OnHMIStatus setVideoStreamingState(VideoStreamingState videoStreamingState)
Set the video streaming state
videoStreamingState - the state of video streaming of the applicationpublic SystemContext getSystemContext()
Get the System Context
public OnHMIStatus setSystemContext(@NonNull SystemContext systemContext)
Set the System Context of OnHMIStatus
systemContext - Indicates that a user-initiated interaction is in-progress
(VRSESSION or MENU), or not (MAIN)public Boolean getFirstRun()
Query whether it's the first run
public OnHMIStatus setFirstRun(Boolean firstRun)
Set the firstRun value
firstRun - True if it is the first run, False or notpublic OnHMIStatus setWindowID(Integer windowID)
Set the windowID value
windowID - This is the unique ID assigned to the window that this RPC is intended.
If this param is not included, it will be assumed that this request is specifically for the main window on the main display.
See PredefinedWindows enum.public Integer getWindowID()
Get the windowID value