Is there any way I can log network calls been triggered from the SDK/Android libraries in my app

285 Views Asked by At

I am developing an Android SDK/library, In here I am performing several network calls. But I don't want the Application developer(who uses my SDK) can log the network calls I performed from my sdk. As It violets our user privacy.

In more details, What I wanted to say, If the Application Developer add any network interceptor with okhttpClient. It should not log any network calls from my SDK. Thanks in advance.

So far I tried to add log interceptor with my OkhttpClientBuilder but no network calls been logged. But I need to be sure there is no other way the Application developer can log my network calls.

1

There are 1 best solutions below

0
CommonsWare On

If the Application Developer add any network interceptor with okhttpClient. It should not log any network calls from my SDK

So long as you are using your own OkHttpClient instance, rather than one that is given to you by an app using your library, you are in control of what interceptors are attached to that OkHttpClient instance.

It is still possible for developers to do things to log your network calls. For example, they could compile their app with a modified copy of OkHttp, one that logs whatever they want.