DataStores
Availability: the DataStores plugin is not included in the current release.
The snapbug-datastores module is temporarily disabled and its implementation is
being reworked; no snapbug-datastores artifacts are published. The page below
describes the planned functionality, and the API may change before release.
Inspect and edit Jetpack DataStore (Preferences) values from the Snapbug inspector. This plugin extends the Preferences inspector, so registered DataStores appear alongside SharedPreferences entries.
Planned Features
- View all DataStore keys and values
- Edit values directly from the inspector
- Real-time updates as values change in the app
- Side-by-side display with SharedPreferences
- Optional value mapper for encrypted DataStores
Planned API
Unlike SharedPreferences, DataStore instances cannot be auto-detected, so each one will be registered explicitly with a display name:
val Context.dataStore by preferencesDataStore(name = "settings")
// Planned API — subject to change before release:
SnapbugDatastorePreference(
name = "App Settings",
dataStore = context.dataStore,
)Registered DataStores will appear in the Preferences section of the Snapbug inspector alongside SharedPreferences entries. The name parameter is the display label.
Editing Values
From the Snapbug inspector:
- Open the Preferences view.
- Registered DataStores appear as separate sections.
- Select any value to edit it.
- Changes are applied immediately to the DataStore on the device.
This is useful for testing edge cases -- quickly change feature flags, user settings, or cached values without rebuilding the app.