Preferences are stored in different places:
- Local preference files (default Preferences provided by LibGDX - XML file with key-value string pairs, stored as an encrypted base64)
Method: getLegacyPropertiesInstance() (returns an instance for loading / saving data)
Stored data: properties split into 4 different categories (ids are Config.PREFERENCES_NAMES), require migration
- Cloud saves (base64 encoded string of the legacy properties, not encrypted)
Method: saveSnapshotAsString(new Array<>(Config.PREFERENCES_NAMES)
Method: loadFromCompactBase64(dataJson.asString(), true)
- As backups on the server (same as Cloud saves - base64 string)
Method: saveSnapshotAsString(new Array<>(Config.PREFERENCES_NAMES))
Method: loadFromUrl(url) which basically uses loadFromCompactBase64(progressBase64)
Game must be able to load previous versions of encoded data from any of the mentioned places.