Skip to content
Mark Taylor edited this page Jan 4, 2014 · 3 revisions

setConfiguration(configuration, successCallback, failureCallback)

  • configuration JSONObject to be sent to the service
  • successCallback The callback which will be called if the method is successful. The callback is passed the [Returned JSON] (Returned-JSON).
  • failureCallback The callback which will be called if the method encounters an error. The callback is passed the [Returned JSON] (Returned-JSON).

Method will enable the passing of configuration details from the HTML/ Javascript front-end to the background service. The configuration is a JSONObject and passed directly to the [setConfig] (setConfig) method of the background service. It is then the responsibility of the [setConfig] (setConfig) method to store/ use those configuration values.

To obtain the current configuration, this can be retrieved from the [Returned JSON] (Returned-JSON) object. The [Returned JSON] (Returned-JSON) is returned by any of the methods (use [getStatus] (getStatus) if you do not want to effect the state of the background service).


Also see

  • [Returned JSON] (Returned-JSON)
  • [Using the Configuration] (Using-the-Configuration)
Clone this wiki locally