Android in-app network visualizer / inspector for your network requests.
Sherlock is a shorthand for "Network Sherlock Holmes" a simple lib that you can plug into your http client to capture everything around network requests, which then provides you or your QA team member with enough info about requests.
it's a very simple and straight forward for v.0.X only OKHttp is supported.
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
debugImplementation 'com.github.shehabic.sherlock:sherlock:v0.11.0'
releaseImplementation 'com.github.shehabic.sherlock:sherlock-no-op:v0.11.0'
// the next part is important (until there is a better solution)
implementation "android.arch.persistence.room:runtime:$architecture_version"
// if your project uses kotlin:
kapt "android.arch.persistence.room:compiler:$architecture_version"
// or if your project doesn't use kotlin:
annotationProcessor "android.arch.persistence.room:compiler:$architecture_version"
}
NetworkSherlock.getInstance().init(appContext)
Kotlin
val client: OkHttpClient = OkHttpClient.Builder().addInterceptor(SherlockOkHttpInterceptor()).build()
Java
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(new SherlockOkHttpInterceptor()).build()
Show/Hide anchor - Show/Hide network activity indicator Kotlin
NetworkSherlock
.getInstance(NetworkSherlock.Config(showAnchor = true, showNetworkActivity = true))
.init(this)
NetworkSherlock.getInstance().pauseRecording()
NetworkSherlock.getInstance().resumeRecording()