Summary: Replaces sonar with flipper in the docs of a website Reviewed By: passy Differential Revision: D9046564 fbshipit-source-id: 55d03d787489406571ea0b4ac0adbc0daaa95cd4
26 lines
776 B
Markdown
26 lines
776 B
Markdown
---
|
|
id: shared-preferences-plugin
|
|
title: Shared Preferences
|
|
---
|
|
|
|
Easily inspect and modify the data contained within your app's shared preferences.
|
|
|
|

|
|
|
|
## Setup
|
|
|
|
Note: this plugin is only available for Android.
|
|
|
|
### Android
|
|
|
|
```java
|
|
import com.facebook.sonar.plugins.sharedpreferences.SharedPreferencesSonarPlugin;
|
|
|
|
client.addPlugin(
|
|
new SharedPreferencesSonarPlugin(context, "my_shared_preference_file"));
|
|
```
|
|
|
|
## Usage
|
|
|
|
All changes to the given shared preference file will automatically appear in Flipper. You may also edit the values in Flipper and have them synced to your device. This can be done by clicking on the value of the specific key you wish to edit, editing the value and then pressing enter.
|