Skip to content

Commit

Permalink
udpate readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
iabdelgawaad committed Jul 21, 2019
1 parent 192a720 commit 6886290
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,25 @@ Step 2. Add the dependency [ make sure that you are on the latest release number

```gradle
dependencies {
implementation 'com.github.district0:ZoomX:1.0.6'
implementation 'com.github.district0:ZoomX:1.0.7'
}
```

Step 3. Initiate ZoomX service
```java
ZoomX.init(new Config.Builder(this).build());
```
Step 4. Log your network requests

Step 4. Start/Stop ZoomX service. You can call it in your app activity cycles like (OnResume/OnPause)
```java
ZoomX.showMenu();
ZoomX.hideHead();
```

Step 5. Log your network requests

# Retrofit
Just add Zoomx NetworkLogInterceptor:
Just add Zoomx ZoomXLoggerInterceptor:
```java
OkHttpClient.Builder httpClient = new OkHttpClient
.Builder()
Expand All @@ -59,7 +66,7 @@ For example:
.setRequestHeaders("HEADERS")
.setResponseBody(response);

NetworkLogManager.log(requestBuilder);
ZoomXLogManager.log(requestBuilder);
```

# Features
Expand All @@ -68,10 +75,10 @@ For example:
- Search within requests url.
- Copy any response/requests and share it via any app ex. (email).
- Display request details in a pretty format.
- Take screenshot

# Upcoming Features
- Take screenshot
- Group requests per page.
- Group requests per page.
- Memory leaks report per page and whole app.
- Control internet speed.
- Shake to change working environment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import timber.log.Timber
* Created by Ahmed Fathallah on 1/11/2018.
*/

class NetworkLogManager {
class ZoomXLogManager {

companion object {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import okhttp3.Headers;
import okhttp3.Interceptor;
Expand Down Expand Up @@ -78,7 +76,7 @@ public Response intercept(@NonNull Chain chain) {
requestBuilder.setResponseBody(responseBody(response));
}

NetworkLogManager.log(requestBuilder);
ZoomXLogManager.log(requestBuilder);
return response;
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 6886290

Please sign in to comment.