There are several ways to store settings.
- Store the settings with a Map object (File.ReadMap / File.WriteMap).
- Use StateManager module which also supports settings.
- Use PreferenceScreen library. This library uses the standard preferences API.
(do a search for each option to find examples)