Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
SubtleAlert

SubtleAlert

Type
Function
Sender
SDL
Purpose
Display a subtle notification-style alert message on the HMI

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.

Must
  1. If the alert includes a soft button of type STEAL_FOCUS and the user presses the button, the HMI must bring the app associated with the SubtleAlert into full screen mode.
  2. If the user selects the alert directly (without selecting one of the softbuttons), the HMI must send a UI.OnSubtleAlertPressed notification to SDL and activate the app that is associated with this SubtleAlert. The alert must then be dismissed from the HMI.
  3. The HMI must send UI.OnSystemContext with type ALERT for the application which is in FULL mode.
  4. Respond to the SubtleAlert earlier than SDL's default timeout of 10 seconds - applicable only to alerts without softButtons.
  5. Display the notification dialog with the text information in the alertStrings array and optional softButtons.
  6. Send Buttons.OnButtonPress and/or Buttons.OnButtonEvent notifications if soft buttons associated with the notification are pressed by the user.
  7. Dismiss the alert after the duration has passed since receipt of the request and send a TIMED_OUT response to SDL.
May

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.

Note

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.

Request

Parameters

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

Response

Parameters

Name Type Mandatory Additional
tryAgainTime Integer false minvalue: 0
maxvalue: 2000000000

Sequence Diagrams

JSON Message Examples

Example Request

{
  "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
  }
}

Example Response

{
  "id" : 92,
  "jsonrpc" : "2.0",
  "result" : {
    "code" : 0,
    "method" : "UI.SubtleAlert"
  }
}

Example Error

{
  "id" : 92,
  "jsonrpc" : "2.0",
  "error" : {
    "code" : 4,
    "message" : "The requested command was rejected.",
    "data" : {
      "tryAgainTime" : 10000,
      "method" : "UI.SubtleAlert"
    }
  }
}
View on GitHub.com
Previous Section Next Section