SDL sends the UI.Alert RPC when some information needs to be displayed to the user on a display. The Alert has a softButtons array of buttons which the user can use to take action on the alert.
STEAL_FOCUS and the user presses the button, the HMI must bring the app associated with the Alert into full screen mode.ALERT for the application which is in FULL mode.softButtons.alertFields array and optional softButtons and optional displayIndicator indicating a timeout for the alert.BC.OnResetTimeout notification to SDL to reset the timeout, in case HMI needs more time to process input from user for the request.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 alert request
An alert may be sent to the HMI for an application which is not currently active. If the alert contains softButtons then the duration will be set to 0. In this case the HMI is required to assign a timeout, and recommended to set a longer than usual timeout.
| Name | Type | Mandatory | Additional |
|---|---|---|---|
| alertStrings | Common.TextFieldStruct | true | array: true minsize: 0 maxsize: 3 |
| duration | Integer | true | minvalue: 3000 maxvalue: 10000 |
| softButtons | Common.SoftButton | false | array: true minsize: 0 maxsize: 4 |
| progressIndicator | Boolean | false | |
| alertType | Common.AlertType | true | |
| appID | Integer | true | |
| cancelID | Integer | false | |
| alertIcon | Common.Image | false |
| Name | Type | Mandatory | Additional |
|---|---|---|---|
| tryAgainTime | Integer | false | minvalue: 0 maxvalue: 2000000000 |
{ "id" : 92, "jsonrpc" : "2.0", "method" : "UI.Alert", "params" : { "alertStrings" : [ { "fieldName" : "alertText1", "fieldText" : "WARNING" }, { "fieldName" : "alertText2", "fieldText" : "Hard weather conditions" } ], "duration" : 5000, "softButtons" : { "type" : "TEXT", "text" : "OK", "softButtonID" : 697, "systemAction" : "DEFAULT_ACTION" }, "alertType": "BOTH", "appID" : 65539 } }
{ "id" : 92, "jsonrpc" : "2.0", "result" : { "code" : 0, "method" : "UI.Alert" } }
{ "id" : 92, "jsonrpc" : "2.0", "error" : { "code" : 4, "message" : "The requested command was rejected.", "data" : { "tryAgainTime" : 10000, "method" : "UI.Alert" } } }