Save the connection settings to native application storage.
hwc.startClient() needs to be called after hwc.saveSettings() for the device to complete automatic/manual registration.
Usage Note: It is not mandatory to specify a value for each hwc.ConnectionSettings property. Specifying a null or undefined for a hwc.ConnectionSettings property will effectively cause this method to IGNORE the property and not change it's value. If the saveSettings() operation fails, a non-zero number will be returned. See hwc.REG_ERR_* for device registration errors. There can be other types of errors not listed here.
<static> saveSettings( settings ) → {number}
Name | Type | Description |
settings | hwc.ConnectionSettings | The connection settings to be saved. |
A status code indicating success (hwc.SETTING_SUCCESS) or an error (one of hwc.REG_ERR_AUTO_REG_NOT_ENABLED, hwc.REG_ERR_AUTO_REG_TEMPLATE_NOT_FOUND, hwc.REG_ERR_AUTO_REG_USER_NAME_TOO_LONG, hwc.REG_ERR_AUTO_REG_WRONG_USER_FOR_DEVICE, hwc.REG_ERR_COULD_NOT_REACH_MMS_SERVER, hwc.REG_ERR_INVALID_USER_NAME, hwc.REG_ERR_MMS_AUTHENTICATION_FAILED).
[/reference/refbody/section/sectiondiv {""})Type:
number
(sectiondiv]// Load the connection settings. var connectionSettings = hwc.loadSettings(); // Modify the connection settings. connectionSettings.ServerName = "999.999.999.999"; // Save the modified connection settings. hwc.saveSettings( connectionSettings ); // Start the client to for the device to complete automatic/manual registration. hwc.startClient();