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
PublishAppService

PublishAppService

Type
Function
Sender
HMI
Purpose
Registers a service offered by the HMI on the module
Note

The HMI may send a PublishAppService RPC request multiple times for a given service type. Additional PublishAppService RPC requests will update the app service manifest, rather than creating a new service, triggering an OnSystemCapabilityUpdated(MANIFEST_UPDATE) notification.

Request

Parameters

Name Type Mandatory Additional
appServiceManifest Common.AppServiceManifest true

Response

Parameters

Name Type Mandatory Additional
appServiceRecord Common.AppServiceRecord false

Sequence Diagrams

JSON Message Examples

Example Request

{
    "id": 1000,
    "jsonrpc": "2.0",
    "method": "AppService.PublishAppService",
    "params": {
        "appServiceManifest": {
            "allowAppConsumers": true,
            "handledRPCs": [41],
            "rpcSpecVersion": {
                "majorVersion": 5,
                "minorVersion": 1
            },
            "serviceName": "IVI_Media",
            "serviceType": "MEDIA"
        }
    }
}

Example Response

{
   "id" : 1000,
   "jsonrpc" : "2.0",
   "result" : {
      "appServiceRecord" : {
         "serviceActive" : true,
         "serviceID" : "1f89547cc0b12d5a52e896c45e141497f7af50e1e2dc8705914e75ef6fbeac03",
         "serviceManifest" : {
            "allowAppConsumers" : true,
            "handledRPCs" : [ 41 ],
            "rpcSpecVersion" : {
               "majorVersion" : 5,
               "minorVersion" : 1
            },
            "serviceName" : "IVI_Media",
            "serviceType" : "MEDIA"
         },
         "servicePublished" : true
      },
      "code" : 0,
      "method" : "AppService.PublishAppService"
  }
}

Example Error

{
  "id" : 176,
  "jsonrpc" : "2.0",
  "error" :
  {
    "code" : 22,
    "message" : "Request timeout",
    "data" :
    {
      "method" : "AppService.PublishAppService"
    }
  }
}
View on GitHub.com
Previous Section Next Section