Member-only story
Various methods to debug HTTP traffic in Android applications
Many developers come across the question: “How to debug outgoing and incoming traffic on Android?”. There are many ways to profile the network, but it would be hard to tell about each of them.
You can find the following tools:
- Network Inspector
- Square OkHttp Logging Interceptor
- OkHttpProfiler
- Charles
- Facebook Flipper
- Proxyman
- Chucker
in the video:
In this article, we will describe only:
- Android Studio Profiler (Network) — a native profiler of the Android Studio
- OkHttp Profiler — a plugin for the Android Studio/IntelliJ IDEA
- Facebook Stetho — a debug bridge for Android applications (currently replaced by Flipper)
- Charles — a proxy application for network
- AppSpector — a debugging tool for Android devices
They all have pros and cons, but they can make the profiling clear and straightforward.
Android Profiler
Each year, Google inventors make developers’ lives more efficient and comfortable. They added a great feature to Android Studio 3.0 — “Advanced network Profiling”.
It can show the amount of incoming and outgoing data, the net timings, but its main feature is that you can see the request data directly in Android Studio. Nevertheless, it has some restrictions- it supports only HttpURLConnection and OkHttp, but I don’t think it can be a real problem.
Let’s turn it on!
Go to the Run > Edit Configurations