Add Shared Preferences plugin docs
Summary: Moar docz Reviewed By: danielbuechele Differential Revision: D8752565 fbshipit-source-id: d7e4392e00dc06b0ffbebce491d5244b4b31a34d
This commit is contained in:
committed by
Facebook Github Bot
parent
51741a2741
commit
56cfe6600d
BIN
docs/assets/shared-preferences.png
Normal file
BIN
docs/assets/shared-preferences.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
25
docs/shared-preferences-plugin.md
Normal file
25
docs/shared-preferences-plugin.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
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 Sonar. You may also edit the values in Sonar 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.
|
||||
@@ -19,8 +19,10 @@
|
||||
"layout-plugin": "Layout Inspector",
|
||||
"logs-plugin": "Logs",
|
||||
"network-plugin": "Network",
|
||||
"sandbox-plugin": "Sandbox",
|
||||
"send-data": "Sending Data to Plugins",
|
||||
"Send Data": "Send Data",
|
||||
"shared-preferences-plugin": "Shared Preferences",
|
||||
"stetho": "Stetho Guidance",
|
||||
"Stetho Guidance": "Stetho Guidance",
|
||||
"styling-components": "Styling Components",
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"logs-plugin",
|
||||
"layout-plugin",
|
||||
"network-plugin",
|
||||
"sandbox-plugin"
|
||||
"sandbox-plugin",
|
||||
"shared-preferences-plugin"
|
||||
],
|
||||
"Plugins: Desktop part": [
|
||||
"js-setup",
|
||||
|
||||
Reference in New Issue
Block a user