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
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
HMI Documentation
SubscribeButton

SubscribeButton

Type
Function
Sender
SDL
Purpose
Subscribe application to a particular button

Request

SDL requests HMI to subscribe an application to a buttonName.

The request may come for the application being whatever active or in background on HMI (depends on SDL Policy Manager permissions).

During Resumption SDL should restore all button subscriptions for application and send required SubscribeButton requests to HMI.

Note

SDL transfers Buttons.SubscribeButton(CUSTOM_BUTTON) request from an application to HMI only if CUSTOM_BUTTON is supported by HMI (Buttons[capabilities] section of hmi_capabilities.json).

Parameters

Name Type Mandatory Additional
appID Integer true
buttonName Common.ButtonName true

Response

Must
  1. Check whether the button subscription can be performed for requested buttonName.
  2. Respond to SDL within DefaultTimeout period after successful button subscription.

Parameters

This RPC has no additional parameter requirements

Sequence Diagrams

JSON Message Examples

Example Request

{
  "id": 32,
  "jsonrpc": "2.0",
  "method": "Buttons.SubscribeButton",
  "params": {
    "appID": 680015438,
    "buttonName": "VOLUME_UP"
  }
}

Example Response

{
  "id": 32,
  "jsonrpc": "2.0",
  "result": {
    "code": 0,
    "method": "Buttons.SubscribeButton"
  }
}

Example Error

{
  "error": {
    "code": 22,
    "data": {
      "method": "Buttons.SubscribeButton"
    },
    "message": "An unknown issue occurred"
  },
  "id": 32,
  "jsonrpc": "2.0"
}
View on GitHub.com
Previous Section Next Section