Roku PhotoBridge Programming: Patterns and Pitfallsfrequal.com

Saving User Preferences

A user-friendly application will remember settings the user has entered and use them automatically during future sessions. The Cascade API provides the class CascadeSettings to help developers easily store preferences in a central location. Each application has a section identified by a unique string starting with a domain name (like "com.frequal.SongInfo"). Within that section there are strings and integers accessed by application-defined strings.

Key Methods

Sample Usage

Preferences Storage

Preferneces are stored in /etc/rokucascade/settings/. There is one file for each application ID string. There is also a backup file with the same name plus .bak. If you need to clear your preferences during testing, be sure to erase both files. The Cascade API automatically uses the backup file if the main one is removed!

Last modified on 23 Nov 2006 by AO

Copyright © 2024 Andrew Oliver