Shared Preferences
Availability: the Preferences plugin is not enabled in the current release.
It is not installed by Snapbug.start(), and the standalone snapbug-sharedprefs
module is temporarily disabled. The feature is planned to return in a future
version; the page below describes how it will work.
The Preferences Explorer lets you view and edit SharedPreferences values directly from the Snapbug inspector. Changes are applied to the device in real time.
Features
- Auto-detection of SharedPreferences files
- Live editing of values from the inspector
- Type-aware writes (Boolean, Int, Long, Float, String)
Auto-Detection
On Android, Snapbug detects all SharedPreferences XML files in your app's shared_prefs directory automatically. No registration code is required for standard SharedPreferences.
Editing Values
Values are edited from the inspector and written back to the device with their original type: a Boolean stays a Boolean, an Int stays an Int, and so on. Unknown or new keys are written as String.
Editing preference values from the inspector modifies them directly on the device. Changes take effect immediately.
DataStore and Custom Stores
Jetpack DataStore support and a public interface for custom key-value stores (encrypted preferences, MMKV, and similar) are part of the temporarily disabled standalone module and are not available in the current release. See the DataStores page for status.