SDL sends the UI.SubtleAlert
RPC when some information needs to be displayed to the user on a display in a non-intrusive way. The request includes an optional array of softButtons
which the user can use to take action on the alert. The alert can also be selected directly to bring the associated application to the foreground.
STEAL_FOCUS
and the user presses the button, the HMI must bring the app associated with the SubtleAlert into full screen mode.ALERT
for the application which is in FULL
mode.softButtons
.alertStrings
array and optional softButtons
.TIMED_OUT
response to SDL.The HMI may provide the user with a system defined "close" button providing the user with the possibility to dismiss the alert. In this case the HMI must still respond to the SubtleAlert request.
An SubtleAlert message may be sent to the HMI for an application which is not currently active. If the alert contains softButtons
then the duration should be ignored.
Name | Type | Mandatory | Additional |
---|---|---|---|
alertStrings | Common.TextFieldStruct | true | array: true minsize: 0 maxsize: 2 |
alertIcon | Common.Image | false | |
duration | Integer | false | minvalue: 3000 maxvalue: 10000 |
softButtons | Common.SoftButton | false | array: true minsize: 0 maxsize: 2 |
alertType | Common.AlertType | true | |
appID | Integer | true | |
cancelID | Integer | false |
Name | Type | Mandatory | Additional |
---|---|---|---|
tryAgainTime | Integer | false | minvalue: 0 maxvalue: 2000000000 |
{ "id" : 92, "jsonrpc" : "2.0", "method" : "UI.SubtleAlert", "params" : { "alertStrings" : [ { "fieldName" : "subtleAlertText1", "fieldText" : "WARNING" }, { "fieldName" : "subtleAlertText2", "fieldText" : "Hard weather conditions" } ], "softButtons" : [ { "type" : "TEXT", "text" : "OK", "softButtonID" : 697, "systemAction" : "DEFAULT_ACTION" } ], "alertType" : "BOTH", "appID" : 65539, "cancelID" : 32123 } }
{ "id" : 92, "jsonrpc" : "2.0", "result" : { "code" : 0, "method" : "UI.SubtleAlert" } }
{ "id" : 92, "jsonrpc" : "2.0", "error" : { "code" : 4, "message" : "The requested command was rejected.", "data" : { "tryAgainTime" : 10000, "method" : "UI.SubtleAlert" } } }