Add Shared Preferences plugin docs

Summary: Moar docz

Reviewed By: danielbuechele

Differential Revision: D8752565

fbshipit-source-id: d7e4392e00dc06b0ffbebce491d5244b4b31a34d
This commit is contained in:
Hilal Alsibai
2018-07-09 02:32:53 -07:00
committed by Facebook Github Bot
parent 51741a2741
commit 56cfe6600d
4 changed files with 29 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View 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.
![Shared Preferences Plugin](/docs/assets/shared-preferences.png)
## 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.

View File

@@ -19,8 +19,10 @@
"layout-plugin": "Layout Inspector", "layout-plugin": "Layout Inspector",
"logs-plugin": "Logs", "logs-plugin": "Logs",
"network-plugin": "Network", "network-plugin": "Network",
"sandbox-plugin": "Sandbox",
"send-data": "Sending Data to Plugins", "send-data": "Sending Data to Plugins",
"Send Data": "Send Data", "Send Data": "Send Data",
"shared-preferences-plugin": "Shared Preferences",
"stetho": "Stetho Guidance", "stetho": "Stetho Guidance",
"Stetho Guidance": "Stetho Guidance", "Stetho Guidance": "Stetho Guidance",
"styling-components": "Styling Components", "styling-components": "Styling Components",

View File

@@ -5,7 +5,8 @@
"logs-plugin", "logs-plugin",
"layout-plugin", "layout-plugin",
"network-plugin", "network-plugin",
"sandbox-plugin" "sandbox-plugin",
"shared-preferences-plugin"
], ],
"Plugins: Desktop part": [ "Plugins: Desktop part": [
"js-setup", "js-setup",