You can prepare settings for the app when you install it.
If you prepare these settings in "Installation Settings" in the app settings, you can show them to the user as a required setting during installation. You can set different settings for different users and devices.
- The keys of the APIs the user wants to use
- Temperature thresholds for sending an email warning
The types of settings that can be made are The types you can set are
|switch||take true or false|
|selectbox||pull-down select box|
There are four types of Each one is displayed to the user as follows.
Using from a program.
Settings can be read with the settings reading function in obniz.js app. All settings are assigned to one object per key.
var install_configration = Obniz.App.configs(); var water_interval = install_configration['water_interval'];
It will be an empty object if it is run from the online editor without being installed.
It is a good idea to provide a default value for this, or in case the user never set it.
var install_configration = Obniz.App.configs(); var water_interval = install_configration['water_interval'] || 30; // default 30