settings

October 22, 2022

settings

[New in v8.2.0]

This module allows you to control some CloudControl internal settings, such as stable mode, volume up key off script, etc.; it will also support modifying some system settings in the future.

$settings.setEnabled(key, value)

  • key {string} The key name of the function to be set. Currently includes.
    • not_show_console Whether to not show the log screen when booting
    • foreground_service whether to enable foreground service notifications (used for live retention)
  • value {boolean} whether to enable this feature

Set whether a feature/setting item is enabled or not.

``javascript

// Disable foreground services $settings.setEnabled('foreground_service', false);


## $settings.isEnabled(key)
* `key` {string} The key name of the function to be set. See `$settings.setEnabled()`
* Returns {boolean} whether the feature is enabled or not

Determines if a feature/settings is enabled.

```javascript
// Print whether a series of settings switches are turned on or not
log('Not showing log screen on startup: ' + $settings.isEnabled('not_show_console'));
log('Foreground service: ' + $settings.isEnabled('foreground_service'));
```js

Last update:
Contributors: Bruce