I am using the latest & greatest Android Studio version:
Android Studio Flamingo | 2022.2.1
Build #AI-222.4459.24.2221.9862592, built on March 31, 2023
Runtime version: 17.0.6+0-b2043.56-9586694 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
So far, it works beautifully, but when I am trying to inspect traffic details as described in https://developer.android.com/studio/debug/network-profiler , I am getting an empty Connection View
tab in the Network Inspector
window:
I may be missing something trivial in how I configure and operate: What do I need to do in order to view populated Connection View
rows as seen in the formal documentation?
Note: The formal documentation states that
"Currently, the Network Inspector supports only the
HttpsURLConnection
andOkHttp
libraries for network connections. If your app uses another network connection library, you might not be able to view your network activity in the Network Inspector."
How can I tell whether WebView.loadUrl() uses HttpsURLConnection
and/or OkHttp
?
Update: By mere chance, I managed to "catch a blip" on Network inspector due to another piece in my code using HttpURLConnection:
HttpURLConnection httpConnection = null;
try {
URL testurl = new URL("https://www.google.com");
URLConnection connection = testurl.openConnection();
connection.setConnectTimeout(5 * 1000);
httpConnection = (HttpURLConnection) connection;
int responseCode = httpConnection.getResponseCode();
...
}
Connection View shows that request along with the associated data (as desired):
So, my two questions now are:
- How can I tell whether WebView.loadUrl() uses
HttpsURLConnection
and/orOkHttp
? - What do I need to do in order to view populated
Connection View
rows for WebView.loadUrl() ?