ApplicationSettings | API - NativeScript

Summary

Functions

clear

flush

Flush all changes to disk synchronously.

getAllKeys

getBoolean

getBoolean(key: string, defaultValue?: boolean): boolean

Gets a value (if existing) for a key as a Boolean Object. A default value can be provided in case there is no existing value.

getNumber

getNumber(key: string, defaultValue?: number): number

Gets a value (if existing) for a key as a Number Object. A default value can be provided in case there is no existing value.

getString

getString(key: string, defaultValue?: string): string

Gets a value (if existing) for a key as a String Object. A default value can be provided in case there is no existing value.

hasKey

hasKey(key: string): boolean

Checks whether such a key exists.

remove

remove(key: string): void

Removes a value (if existing) for a key.

setBoolean

setBoolean(key: string, value: boolean): void

Sets a Boolean Object for a key.

setNumber

setNumber(key: string, value: number): void

Sets a Number Object for a key.

setString

setString(key: string, value: string): void

Sets a String Object for a key.