Chucker
๐ An HTTP inspector for Android & OkHTTP (like Charles but on device)
Install / Use
/learn @ChuckerTeam/ChuckerREADME
Chucker
A fork of Chuck
<p align="center"> <img src="assets/ic_launcher-web.png" alt="chucker icon" width="30%"/> </p>Chucker simplifies the inspection of HTTP(S) requests/responses fired by your Android App. Chucker works as an OkHttp Interceptor persisting all those events inside your application, and providing a UI for inspecting and sharing their content.
Apps using Chucker will display a notification showing a summary of ongoing HTTP activity. Tapping on the notification launches the full Chucker UI. Apps can optionally suppress the notification, and launch the Chucker UI directly from within their own interface.
<p align="center"> <img src="assets/chucker-http.gif" alt="chucker http sample" width="50%"/> </p>Getting Started ๐ฃ
Chucker is distributed through Maven Central. To use it you need to add the following Gradle dependency to the build.gradle file of your android app module (NOT the root file).
Please note that you should add both the library and the library-no-op variant to isolate Chucker from release builds as follows:
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:4.2.0"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:4.2.0"
}
To start using Chucker, just plug in a new ChuckerInterceptor to your OkHttp Client Builder:
val client = OkHttpClient.Builder()
.addInterceptor(ChuckerInterceptor(context))
.build()
That's it! ๐ Chucker will now record all HTTP interactions made by your OkHttp client.
Historically, Chucker was distributed through JitPack.
You can find older version of Chucker here: .
Features ๐งฐ
Don't forget to check the changelog to have a look at all the changes in the latest version of Chucker.
- Compatible with OkHTTP 4
- API >= 21 compatible
- Easy to integrate (just 2 gradle
implementationlines). - Works out of the box, no customization needed.
- Empty release artifact ๐งผ (no traces of Chucker in your final APK).
- Support for body text search with highlighting ๐ต๏ธโโ๏ธ
- Support for showing images in HTTP Responses ๐ผ
- Support for custom decoding of HTTP bodies
Multi-Window ๐ช
The main Chucker activity is launched in its own task, allowing it to be displayed alongside the host app UI using Android 7.x multi-window support.

Configure ๐จ
You can customize chucker providing an instance of a ChuckerCollector:
// Create the Collector
val chuckerCollector = ChuckerCollector(
context = this,
// Toggles visibility of the notification
showNotification = true,
// Allows to customize the retention period of collected data
retentionPeriod = RetentionManager.Period.ONE_HOUR
)
// Create the Interceptor
val chuckerInterceptor = ChuckerInterceptor.Builder(context)
// The previously created Collector
.collector(chuckerCollector)
// The max body content length in bytes, after this responses will be truncated.
.maxContentLength(250_000L)
// List of headers to replace with ** in the Chucker UI
.redactHeaders("Auth-Token", "Bearer")
// Read the whole response body even when the client does not consume the response completely.
// This is useful in case of parsing errors or when the response body
// is closed before being read like in Retrofit with Void and Unit types.
.alwaysReadResponseBody(true)
// Use decoder when processing request and response bodies. When multiple decoders are installed they
// are applied in an order they were added.
.addBodyDecoder(decoder)
// Controls Android shortcut creation.
.createShortcut(true)
.build()
// Don't forget to plug the ChuckerInterceptor inside the OkHttpClient
val client = OkHttpClient.Builder()
.addInterceptor(chuckerInterceptor)
.build()
Redact-Header ๐ฎโโ๏ธ
Warning The data generated and stored when using Chucker may contain sensitive information such as Authorization or Cookie headers, and the contents of request and response bodies.
It is intended for use during development, and not in release builds or other production deployments.
You can redact headers that contain sensitive information by calling redactHeader(String) on the ChuckerInterceptor.
interceptor.redactHeader("Auth-Token", "User-Session");
Decode-Body ๐
Chucker by default handles only plain text, Gzip compressed or Brotli compressed. If you use a binary format like, for example, Protobuf or Thrift it won't be automatically handled by Chucker. You can, however, install a custom decoder that is capable of reading data from different encodings.
object ProtoDecoder : BodyDecoder {
fun decodeRequest(request: Request, body: ByteString): String? = if (request.isExpectedProtoRequest) {
decodeProtoBody(body)
} else {
null
}
fun decodeResponse(request: Response, body: ByteString): String? = if (request.isExpectedProtoResponse) {
decodeProtoBody(body)
} else {
null
}
}
interceptorBuilder.addBodyDecoder(ProtoDecoder).build()
Notification Permission ๐
Starting with Android 13, your apps needs to request the android.permission.POST_NOTIFICATIONS permission to the user in order to show notifications.
As Chucker also shows notifications to show network activity you need to handle permission request depending on your app features.
Without this permission Chucker will track network activity, but there will be no notifications on devices with Android 13 and newer.
There are 2 possible cases:
- If your app is already sending notifications, you don't need to do anything as Chucker will
show a notification as soon as the
android.permission.POST_NOTIFICATIONSpermission is granted to your app. - If your app does not send notifications you would need to open Chucker directly (can be done via shortcut, which is added to your app by default when Chucker is added)
and click
Allowin the dialog with permission request. In case you don't allow this permission or dismiss that dialog by mistake, on every Chucker launch there will be a snackbar with a button to open your app settings where you can change permissions settings. Note, you need to grantandroid.permission.POST_NOTIFICATIONSto your app in Settings as there will be no separate app in Apps list in Settings.
Migrating ๐
If you're migrating from Chuck to Chucker, please refer to this migration guide.
If you're migrating from Chucker v2.0 to v3.0, please expect multiple breaking changes. You can find documentation on how to update your code on this other migration guide.
Snapshots ๐ฆ
Development of Chucker happens in the main branch. Every push to main will trigger a publishing of a SNAPSHOT artifact for the upcoming version. You can get those snapshots artifacts directly from Sonatype with:
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:4.2.0-SNAPSHOT"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:4.2.0-SNAPSHOT"
}
Moreover, you can still use JitPack as it builds every branch. So the top of main is available here:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:main-SNAPSHOT"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:main-SNAPSHOT"
}
โ ๏ธ Please note that the latest snapshot might be unstable. Use it at your own risk โ ๏ธ
If you're looking for the latest stable version, you can always find it in Releases section.
FAQ โ
- Why are some of my request headers (e.g.
Content-EncodingorAccept-Encoding) missing? - Why are retries and redirects not being captured discretely?
- Why are my encoded request/response bodies not appearing as plain te
Related Skills
tmux
329.0kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
blogwatcher
329.0kMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
product
Cloud-agnostic Kubernetes infrastructure with Terraform & Helm for homelabs, edge, and production clusters.
Unla
2.1k๐งฉ MCP Gateway - A lightweight gateway service that instantly transforms existing MCP Servers and APIs into MCP servers with zero code changes. Features Docker deployment and management UI, requiring no infrastructure modifications.
