NetworkInstrumentation
Import com.crittercism.app package to use this class.
Instrumenting OkHttpClient (Beta)¶
Omnissa Intelligence Android SDK offers users the ability to instrument OkHttpClients to collect Network Insights data.
instrumentOkHttpClient(okHttpClient)¶
Enables OkHttpClient instrumentation to collect network insights. It must be called on the main UI thread after the OkHttpClient is set. Once the method is invoked, Omnissa Intelligence SDK will automatically log network calls made with the returned instrumented client to the Network Insights page of the Omnissa Intelligence portal.
Here’s an example of how to instrument a client:
OkHttpClient uninstrumentedClient = new OkHttpClient();
OkHttpClient instrumentedClient = Crittercism.getNetworkInstrumentation().instrumentOkHttpClient(uninstrumentedClient);
// now you can use the instrumented client for network calls (on a different thread)
instrumentedClient.newCall(...).execute();
Introduced in Omnissa Intelligence Android SDK 5.8.11-beta11. Requires OkHttp 3.3.0 and above.