Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Adaptive Interface Capabilities

Designing for Different Head Units

Since each car manufacturer has different user interface style guidelines, the number of lines of text, soft and hard buttons, and images supported will vary between different types of head units. When the app first connects to the SDL Core, a RegisterAppInterface response RPC will be sent by Core with the displayCapabilities, buttonCapabilities, speechCapabilities and other properties. You should use this information to create the user interface of your SDL app.

You may access these properties on the SDLManager.systemCapabilityManager instance as of library v.6.0.

System Capability Manager Properties

Parameters Description Notes
displayCapabilities Information about the HMI display. This includes information about available templates, whether or not graphics are supported, and a list of all text fields and the max number of characters allowed in each text field. Check SDLDisplayCapabilities.h for more information
buttonCapabilities A list of available buttons and whether the buttons support long, short and up-down presses. Check SDLButtonCapabilities.h for more information
softButtonCapabilities A list of available soft buttons and whether the button support images. Also, information about whether the button supports long, short and up-down presses. Check SDLSoftButtonCapabilities.h for more information
presetBankCapabilities If returned, the platform supports custom on-screen presets. Check SDLPresetBankCapabilities.h for more information
hmiZoneCapabilities Specifies HMI Zones in the vehicle. There may be a HMI available for back seat passengers as well as front seat passengers. Check SDLHMIZoneCapabilities.h
speechCapabilities Contains information about TTS capabilities on the SDL platform. Platforms may support text, SAPI phonemes, LH PLUS phonemes, pre-recorded speech, and silence. Check SDLSpeechCapabilities.h for more information
prerecordedSpeechCapabilities A list of pre-recorded sounds you can use in your app. Sounds may include a help, initial, listen, positive, or a negative jingle. Check SDLPrerecordedSpeech.h for more information
vrCapability The voice-recognition capabilities of the connected SDL platform. The platform may be able to recognize spoken text in the current language. Check SDLVRCapabilities.h for more information
audioPassThruCapabilities Describes the sampling rate, bits per sample, and audio types available. Check SDLAudioPassThruCapabilities.h for more information
pcmStreamCapabilities Describes different audio type configurations for the audio PCM stream service, e.g. {8kHz,8-bit,PCM}. Check SDLAudioPassThruCapabilities.h for more information
hmiCapabilities Returns whether or not the app can support built-in navigation and phone calls. Check SDLHMICapabilities.h for more information
appServicesCapabilities Describes the capabilities of app services including what service types are supported and the current state of services. Check SDLAppServicesCapabilities.h for more information
navigationCapability Describes the built-in vehicle navigation system's APIs. Check SDLNavigationCapability.h for more information
phoneCapability Describes the built-in phone calling capabilities of the IVI system. Check SDLPhoneCapability.h for more information
videoStreamingCapability Describes the abilities of the head unit to video stream projection applications. Check SDLVideoStreamingCapability.h for more information
remoteControlCapability Describes the abilities of an app to control built-in aspects of the IVI system. Check SDLRemoteControlCapabilities.h for more information

The Register App Interface Response (RAIR) RPC

The RegisterAppInterface response contains information about the display type, the type of images supported, the number of text fields supported, the HMI display language, and a lot of other useful properties. The table below has a list of properties beyond those available on the system capability manager returned by the RegisterAppInterface response. Each property is optional, so you may not get data for all the parameters in the following table.

Parameters Description Notes
syncMsgVersion Specifies the version number of the SmartDeviceLink protocol that is supported by the mobile application. Check SDLSyncMsgVersion.h for more information
language The currently active VR+TTS language on the module. Check SDLLanguage.h for more information
vehicleType The make, model, year, and the trim of the vehicle. Check SDLVehicleType.h for more information
supportedDiagModes Specifies the white-list of supported diagnostic modes (0x00-0xFF) capable for DiagnosticMessage requests. If a mode outside this list is requested, it will be rejected. Check SDLDiagnosticMessage.h for more information
sdlVersion The SmartDeviceLink version. String
systemSoftwareVersion The software version of the system that implements the SmartDeviceLink core. String

Image Specifics

Image File Types

Images may be formatted as PNG, JPEG, or BMP. Each SDLManager.registerResponse.displayCapabilities.imageFields property will have a list of imageTypeSupported.

Image Sizes

If an image is uploaded that is larger than the supported size, that image will be scaled down by Core. All image sizes are available from the SDLManager.registerResponse.displayCapabilities.imageFields property once the manager has started successfully.

ImageName Used in RPC Details Height Width Type
softButtonImage Show Image shown on softbuttons on the base screen 70px 70px png, jpg, bmp
choiceImage CreateInteractionChoiceSet Image shown in the manual part of an performInteraction either big (ICON_ONLY) or small (LIST_ONLY) 70px 70px png, jpg, bmp
choiceSecondaryImage CreateInteractionChoiceSet Image shown on the right side of an entry in (LIST_ONLY) performInteraction 35px 35px png, jpg, bmp
vrHelpItem SetGlobalProperties Image shown during voice interaction 35px 35px png, jpg, bmp
menuIcon SetGlobalProperties Image shown on the “More…” button 35px 35px png, jpg, bmp
cmdIcon AddCommand Image shown for commands in the "More…" menu 35px 35px png, jpg, bmp
appIcon SetAppIcon Image shown as Icon in the "Mobile Apps" menu 70px 70px png, jpg, bmp
graphic Show Image shown on the basescreen as cover art 185px 185px png, jpg, bmp

Querying the RAIR Capabilities

Objective-C
BOOL vrCapability = self.sdlManager.systemCapabilityManager.vrCapability;
Swift
let vrCapability = sdlManager.systemCapabilityManager.vrCapability;

System Capabilities

Most head units provide features that your app can use: making and receiving phone calls, an embedded navigation system, video and audio streaming, as well as supporting app services. To find out if the head unit supports a feature as well as more information about the feature, use the SDLSystemCapabilityManager to query the head unit for the desired capability. Querying for capabilities is only available on head units supporting SDL Core v4.5 or greater; if connecting to older head units, the query will return nil even if the head unit may support the capabilty.

Querying for System Capabilities

Objective-C
[self.sdlManager.systemCapabilityManager updateCapabilityType:SDLSystemCapabilityTypeVideoStreaming completionHandler:^(NSError * _Nullable error, SDLSystemCapabilityManager * _Nonnull systemCapabilityManager) {
    if (error != nil || systemCapabilityManager.videoStreamingCapability == nil) {
        return;
    }
    <#Use the video streaming capability#>
}];
Swift
sdlManager.systemCapabilityManager.updateCapabilityType(.videoStreaming) { (error, manager) in
    guard error == nil, let videoStreamingCapability = manager.videoStreamingCapability else {
        return
    }
    <#Use the video streaming capability#>
}

Subscribing to System Capability Updates

In addition getting the current system capabilities, it is also possible to register to get updates when the head unit capabilities change. To get these notifications you must register using a subscribeToCapabilityType: method. This feature is only available on head units supporting v.5.1 or greater.

Checking if the Head Unit Supports Subscriptions

Objective-C
BOOL supportsSubscriptions = self.sdlManager.systemCapabilityManager.supportsSubscriptions;
Swift
let supportsSubscriptions = sdlManager.systemCapabilityManager.supportsSubscriptions;

Subscribe to a Capability

Objective-C
// Subscribing to a capability via a selector callback
[self.sdlManager.systemCapabilityManager subscribeToCapabilityType:SDLSystemCapabilityTypeNavigation withObserver:self selector:@selector(navigationCapabilitySelectorCallback:)];

// This can either have one or zero parameters. If one parameter it must be of type `SDLSystemCapability`. See the [reference documentation](https://smartdevicelink.com/en/docs/iOS/master/Classes/SDLSystemCapabilityManager/) for more details (// TODO: Update with the link to the actual method)
- (void)navigationCapabilitySelectorCallback:(SDLSystemCapability *)capability {
    SDLNavigationCapability *navCapability = capability.navigationCapability;

    <#Use the capability#>
}

// Subscribing to a capability via a block callback
[self subscribeToCapabilityType:SDLSystemCapabilityTypeNavigation usingBlock:^(SDLSystemCapability * _Nonnull capability) {
    SDLNavigationCapability *navCapability = capability.navigationCapability;
    <#Use the capability#>
}];
Swift
// Subscribing to a capability via a selector callback
sdlManager.systemCapabilityManager.subscribe(toCapabilityType: .navigation, withObserver: self, selector: #selector(navigationCapabilitySelectorCallback(_:)))

@objc private func navigationCapabilitySelectorCallback(_ capability: SDLSystemCapability) {
    let navCapability = capability.navigationCapability;

    <#Use the capability#>
}

// Subscribing to a capability via a block callback
sdlManager.systemCapabilityManager.subscribe(toCapabilityType: .navigation) { (capability) in
    let navCapability = capability.navigationCapability;
    <#Use the capability#>
}
View on GitHub.com
Previous Section Next Section