Alexa Auto SDK  2.0.0
Static Public Member Functions | List of all members
com.amazon.aace.alexa.config.AlexaConfiguration Class Reference

Static Public Member Functions

static EngineConfiguration createDeviceInfoConfig (final String deviceSerialNumber, final String clientId, final String productId)
 
static EngineConfiguration createAlertsConfig (final String databaseFilePath)
 
static EngineConfiguration createNotificationsConfig (final String databaseFilePath)
 
static EngineConfiguration createCertifiedSenderConfig (final String databaseFilePath)
 
static EngineConfiguration createCurlConfig (String certsPath)
 
static EngineConfiguration createCurlConfig (final String certsPath, final String iface)
 
static EngineConfiguration createSettingsConfig (final String databaseFilePath, final String locale)
 
static EngineConfiguration createSettingsConfig (String databaseFilePath)
 
static EngineConfiguration createMiscStorageConfig (final String databaseFilePath)
 
static EngineConfiguration createSystemConfig (final int firmwareVersion)
 
static EngineConfiguration createSpeechRecognizerConfig (final String encoderName)
 
static EngineConfiguration createTemplateRuntimeTimeoutConfig (final TemplateRuntimeTimeout[] timeoutList)
 
static EngineConfiguration createEqualizerControllerConfig (final EqualizerBand[] supportedBands, final int minLevel, final int maxLevel, final EqualizerBandLevel[] defaultBandLevels)
 

Detailed Description

A factory interface for creating Alexa configuration objects

Member Function Documentation

◆ createDeviceInfoConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createDeviceInfoConfig ( final String  deviceSerialNumber,
final String  clientId,
final String  productId 
)
static

Factory method used to programmatically generate device info configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"deviceInfo":
{
"deviceSerialNumber": "<DEVICE_SERIAL_NUMBER>"
"clientId": "<CLIENT_ID>",
"productId": "<PRODUCT_ID>"
}
}
Parameters
deviceSerialNumberThe device serial number used to authorize the client with AVS
clientIdThe client ID used to authorize the client with AVS
productIdThe product ID used to authorize the client with AVS

◆ createAlertsConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createAlertsConfig ( final String  databaseFilePath)
static

Factory method used to programmatically generate alerts configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"alertsCapabilityAgent":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
Parameters
databaseFilePathThe file path to the SQLite database used to store persistent alerts data. The database will be created on initialization if it does not already exist.

◆ createNotificationsConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createNotificationsConfig ( final String  databaseFilePath)
static

Factory method used to programmatically generate notifications configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"notifications":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
Parameters
databaseFilePathThe file path to the SQLite database used to store persistent notifications data. The database will be created on initialization if it does not already exist.

◆ createCertifiedSenderConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createCertifiedSenderConfig ( final String  databaseFilePath)
static

Factory method used to programmatically generate certified sender configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"certifiedSender":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
Parameters
databaseFilePathThe file path to the SQLite database used to store persistent certified sender data. The database will be created on initialization if it does not already exist.

◆ createCurlConfig() [1/2]

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createCurlConfig ( String  certsPath)
static

Factory method used to programmatically generate CURL configuration data. The 'libCurlUtils' sub-component of the global configuration supports the following options:

  • CURLOPT_CAPATH If present, specifies a value for the libcurl property CURLOPT_CAPATH. The data generated by this method is equivalent to providing the following JSON values in a configuration file:
{
"libcurlUtils" : {
"CURLOPT_CAPATH" : "<CA_CERTIFICATES_FILE_PATH>"
}
}
Parameters
certsPathThe file path to the directory holding CA certificates

◆ createCurlConfig() [2/2]

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createCurlConfig ( final String  certsPath,
final String  iface 
)
static

Factory method used to programmatically generate CURL configuration data. The 'libCurlUtils' sub-component of the global configuration supports the following options:

  • CURLOPT_CAPATH If present, specifies a value for the libcurl property CURLOPT_CAPATH.
  • CURLOPT_INTERFACE if present, specifies a value for the libcurl property CURLOPT_INTERFACE. The data generated by this method is equivalent to providing the following JSON values in a configuration file:
{
"libcurlUtils" : {
"CURLOPT_CAPATH" : "<CA_CERTIFICATES_FILE_PATH>"
"CURLOPT_INTERFACE" : "<NETWORK_INTERFACE_NAME>"
}
}
Parameters
certsPathThe file path to the directory holding CA certificates
ifaceThe interface used for outgoing network interface. This can be an network interface name, an IP address or a host name.

◆ createSettingsConfig() [1/2]

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createSettingsConfig ( final String  databaseFilePath,
final String  locale 
)
static

Factory method used to programmatically generate settings configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"settings": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>",
"defaultAVSClientSettings": {
"locale": "<LOCALE>"
}
}
}
Parameters
databaseFilePathThe file path to the SQLite database used to store persistent settings data. The database will be created on initialization if it does not already exist.
localeThe current locale setting on the client

◆ createSettingsConfig() [2/2]

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createSettingsConfig ( String  databaseFilePath)
static

Factory method used to programmatically generate settings configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"settings": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>",
"defaultAVSClientSettings": {
"locale": "<LOCALE>"
}
}
}
Parameters
databaseFilePathThe file path to the SQLite database used to store persistent settings data. The database will be created on initialization if it does not already exist.
localeThe current locale setting on the client

◆ createMiscStorageConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createMiscStorageConfig ( final String  databaseFilePath)
static

Factory method used to programmatically generate misc storage configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"miscDatabase":
{
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>",
}
}
Parameters
databaseFilePathThe file path to the SQLite database used to store persistent misc storage data. The database will be created on initialization if it does not already exist.

◆ createSystemConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createSystemConfig ( final int  firmwareVersion)
static

Factory method used to programmatically generate system configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"system": {
"firmwareVersion": "<FIRMWARE_VERSION>"
}
}
}
Parameters
firmwareVersionThe firmware version of the client device

◆ createSpeechRecognizerConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createSpeechRecognizerConfig ( final String  encoderName)
static

Factory method used to programmatically generate encoder configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"speechRecognizer": {
"encoder": {
"name": "<ENCODER_NAME>"
}
}
}
}
Parameters
encoderNameThe encoder codec name to be used

◆ createTemplateRuntimeTimeoutConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createTemplateRuntimeTimeoutConfig ( final TemplateRuntimeTimeout []  timeoutList)
static

Factory method used to programmatically generate template runtime configuration data. This is an optional configuration. Following are the accepted keys and their description.

  • displayCardTTSFinishedTimeout If present, specifies the values in milli seconds to control the timeout of display card at the Alexa Speech.
  • displayCardAudioPlaybackFinishedTimeout If present, specifies the values in milli seconds to control the timeout of display card at the FINISHED state of AudioPlayback.
  • displayCardAudioPlaybackStoppedPausedTimeout If present, specifies the values in milli seconds to control the timeout of display card at STOP or PAUSE state of AudioPlayback. The data generated by this method is equivalent to providing the following JSON values in a configuration file:
{
"templateRuntimeCapabilityAgent": {
"displayCardTTSFinishedTimeout": <TIMEOUT_IN_MS>,
"displayCardAudioPlaybackFinishedTimeout": <TIMEOUT_IN_MS>,
"displayCardAudioPlaybackStoppedPausedTimeout": <TIMEOUT_IN_MS>
}
}
Parameters
timeoutListA list of TemplateRuntimeTimeout type and value pairs

◆ createEqualizerControllerConfig()

static EngineConfiguration com.amazon.aace.alexa.config.AlexaConfiguration.createEqualizerControllerConfig ( final EqualizerBand []  supportedBands,
final int  minLevel,
final int  maxLevel,
final EqualizerBandLevel []  defaultBandLevels 
)
static

Factory method used to programmatically generate equalizer controller configuration data. This is an optional configuration, and default settings will be used if configuration is not provided. This method produces configuration data according to the JSON structure in the sample below.

"equalizer": {
"bands": {
"BASS": true,
"MIDRANGE": false,
"TREBLE": true
},
"defaultState": {
"bands": {
"BASS": 4,
"TREBLE" : -1
}
},
"minLevel": -6,
"maxLevel": 6
}

The configuration branches are used as follows:

  • equalizer.bands: Specifies which bands are supported by the device and will be enabled for control with Alexa. Each child key is the name of an Alexa-supported band ("BASS", "MIDRANGE", or "TREBLE") and value is whether the device supports the band. Only bands explicitly declared supported will be enabled in the SDK and Alexa. Omitting this branch enables all bands by default.
  • equalizer.defaultState: Describes the default or reset state of the equalizer. These settings are used to reset the equalizer with Alexa such as by saying "Alexa, reset bass." If this branch or its child is omitted, default values will be used.
  • equalizer.defaultState.bands: Defines the default gain level setting in dB for each supported equalizer band. Each element key is the name of a supported band and value is a level (int) specifying the default gain in dB. All of the supported bands must be provided once this branch is defined. All dB levels must obey the limits declared in "equalizer.minLevel" and "equalizer.maxLevel". Omitting this branch uses the default 0db for each band.
  • equalizer.minLevel and equalizer.maxLevel: Integer values specifying the decibel level range on which Alexa may operate for the supported bands. The device may support a different range internally, but Alexa will know only about the limits declared here. Values should be specified as absolute amplitude gain in integer dB and scaled to the platform's internal range as necessary. If these values are omitted, the default range min -6dB and max +6dB will be used.
Parameters
supportedBandsThe supported equalizer bands. Corresponds to the "equalizer.bands" config branch. Only bands provided will be enabled. Null supportedBands omits the config branch. Nonnull supportedBands includes the branch and declares each band in the set with a value "true".
minLevelThe minimum gain level for the equalizer bands in integer dB. Corresponds to "equalizer.minLevel".
maxLevelThe maximum gain level for the equalizer bands in integer dB. Corresponds to "equalizer.maxLevel".
defaultBandLevelsThe default or reset state of the equalizer bands. Corresponds to the "equalizer.defaultState.bands" config branch. Null defaultBandLevels omits the config branch.

Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0