cordova-plugin-app-settings
Your help is appreciated. Create a PR, submit a bug or just grab me 🍺 |
---|
Index
Supported Platforms
- iOS
- Android
Installation
$ cordova plugin add cordova-plugin-app-settings
Methods
Every method returns a promise that fulfills when a call was successful.
getString(key) : Promise
Get a string value for a key.
cordova.plugins.settings.getString("foo").then(function(value) {
console.log("foo value is:", value);
});
setString(key, value) : Promise
Sets a string value for a key.
cordova.plugins.settings.setString("foo", "bar").then(function() {
console.log("foo value is updated");
});
getNumber(key) : Promise
Get a numeric value for a key.
cordova.plugins.settings.getNumber("foo").then(function(value) {
console.log("foo value is:", value);
});
setNumber(key, value) : Promise
Sets a numeric value for a key.
cordova.plugins.settings.setNumber("foo", 123).then(function() {
console.log("foo value is updated");
});
getBoolean(key) : Promise
Get a boolean value for a key.
cordova.plugins.settings.getNumber("foo").then(function(value) {
console.log("foo value is:", value);
});
setBoolean(key, value) : Promise
Sets a boolean value for a key.
cordova.plugins.settings.setNumber("foo", true).then(function() {
console.log("foo value is updated");
});