🗝️ Preferences & DataStore Editor
Flocon provides full visibility into your app's key-value storage (SharedPreferences and Jetpack DataStore), allowing you to view and edit values live from the desktop UI.
Overview
Features:
- Auto-Discovery: Automatically finds and lists default SharedPreferences files on Android.
- DataStore Support: Seamlessly browse and mutate PreferencesDataStore keys.
- Live Mutation: Edit booleans, numbers, strings, and JSON objects in real-time.
Setup & Registration
Standard SharedPreferences (Android)
Default SharedPreferences are automatically indexed. To provide a custom display name:
val userPrefs = context.getSharedPreferences("user_pref", Context.MODE_PRIVATE)
floconRegisterPreference(FloconSharedPreference(name = "User Settings", userPrefs))
Jetpack DataStore
Register your DataStore instance:
val Context.dataStore by preferencesDataStore(name = "settings")
// Register with Flocon
floconRegisterPreference(FloconDatastorePreference(name = "App Settings", context.dataStore))
Custom Key-Value Storage
You can expose any proprietary storage system (such as EncryptedSharedPreferences or custom key-value stores) by implementing FloconPreference:
class MyCustomPreference : FloconPreference {
override val name: String = "Encrypted Vault"
override suspend fun columns(): List<String> = listOf("token", "is_authenticated")
override suspend fun get(columnName: String): FloconPreferenceValue? {
return FloconPreferenceValue(stringValue = readSecureKey(columnName))
}
override suspend fun set(columnName: String, value: FloconPreferenceValue) {
writeSecureKey(columnName, value.stringValue)
}
}
floconRegisterPreference(MyCustomPreference())