ConfigurationParameter

ConfigurationParameter provides APIs to access properties of the configutation parameter. It provides information about:

  • The parameter value and notification on change of the value
  • Whether the device requires reboot to update the value
  • Whether the parameter value is changeable

Example:

console.log("Get value - " + ConfigConstants.CFG_PREFERENCES_RINGERVOLUME + " : " +
       dapi.configuration.parameter(ConfigConstants.CFG_PREFERENCES_RINGERVOLUME).value + ", changeable : " +
       dapi.configuration.parameter(ConfigConstants.CFG_PREFERENCES_RINGERVOLUME).changeable +  ", rebootOnChange : " +
       dapi.configuration.parameter(ConfigConstants.CFG_PREFERENCES_RINGERVOLUME).rebootOnChange);

Member Summary

Public Members

Check whether the parameter is changeable.

Check whether changing the parameter's value requires a Dolby Voice Hub reboot.

Read the parameter value.

ValueChanged allows the app to be notified when the parameter value changes.

Public Members

public changeable: boolean source

Check whether the parameter is changeable.

public rebootOnChange: boolean source

Check whether changing the parameter's value requires a Dolby Voice Hub reboot.

public value: string | boolean | number source

Read the parameter value.

public valueChanged: PropertyChanged source

ValueChanged allows the app to be notified when the parameter value changes.

Example:

// Connect for value change
var myCallBack = function ()  {
    console.log("Preferences.DndEnabled changed: " + dapi.configuration.parameter("Preferences.DndEnabled").value);
}
dapi.configuration.parameter("Preferences.DndEnabled").valueChanged.connect(myCallBack);
// Disconnect the callback if needed
dapi.configuration.parameter("Preferences.DndEnabled").valueChanged.disconnect(myCallBack);