aboutsummaryrefslogtreecommitdiffstats
path: root/AndroidAsyncStetho/README.md
blob: d52d7954ffd4f9dff4422dd99bd0b47fcb1444cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# AndroidAsync and Ion Stetho support

[Stetho](https://github.com/facebook/stetho) is a tool that lets you log and view your network requests and more on Android.

### Using Stetho with Ion

```java
// typical initialization of Stetho
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
.build());

Ion.getDefault(this).getHttpClient().getMiddleware()
.add(new StethoMiddleware());
```

### Using Stetho with AndroidAsync

```java
// typical initialization of Stetho
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
.build());

AsyncHttpClient.getDefaultInstance().getMiddleware()
.add(new StethoMiddleware());
```