147: Disposing RxJava 2 Streams with AutoDispose

In this short fragment episode, Donn explains how you can clean up your RxJava 2 streams and ensure no memory leaks are occurring by using the AutoDispose library from Uber.



Code Samples





With Scope Event Provided

    .autoDisposable(AndroidLifcycleScopeProvider.from(this, Lifecycle.Event.ON_DESTROY))


// File: CustomerService.kt
class CustomerService @Inject constructor(...) {
    lateinit var scopeProvider: ScopeProvider

// Usage in Fragment/Activity/etc
val service = CustomerService(...).apply {
    scopeProvider = AndroidLifecycleScopeProvider.from(this)

// Usage in Test
val service = CustomerService(...).apply {
    scopeProvider = TestScopeProvider.create()


146: 3 Things Every Android Developer Needs to Know

In this episode of Fragmented, Donn digs into three things that every Android developer needs to know.


  • Dependency Injection

    1. Constructor_setter_method injection
    2. Service Locators or other DI frameworks
    3. Common Frameworks
      1. Dagger
      2. Koin
      3. Kodein
      4. ToothPick
  • How to test

    1. Functional / System
    2. Integration
    3. Unit
    4. Tools:
      1. jUnit
      2. Espresso
      3. Spek
  • Keep it simple simple

    1. KISS principle KISS principle – Wikipedia
    2. Examples
      1. Code Duplication
        1. “Extract this into a method”
      2. Lets create a framework for this
      3. Kaushik’s – 3x rule
        • if something is duplicated 3 or more times, think about extracting it
      4. 3/6 Rule – In 6 months, will I be able to understand this in under 3 minutes?


145: Tracking Network Requests With x-Request-ID

In this short fragment, Kaushik explains how you can trace network requests from your app by adding a special header. Easily trace an HTTP request all the way from a client to your backend web process.



Sponsors 🙏


144: Developer Productivity Tools

In this episode, Donn and Kaushik talk about productivity tools for developers. As developers, what are some additional tools and utilities that really up your game. If you wanted to see how they tweak their development environments and workstations in general, this is a good episode to listen. Also introducing a Fragmented Discord Chat server!



Productivity tools

Keyboard Maestro

Sponsors 🙏


Fragmented Discord Chat Server

Kaushik and I are excited to announce that we’ve created a public Discord server that you can join, for free to chat with other folks in the community.

We wanted to create a place where listeners could get together, ask questions, communicate and help each other. The goal of our podcast has always been to share knowledge and we feel that this is only a natural extension of our original vision.

Join Here

You can join the discord group by installing the Discord app and joining the server via the link below.

Why didn’t you use Slack?

This is a great question, and one that we grappled with for a bit. Ultimately it came down to the fact that Slack has a 10,000 message limit on the free plan. This severely limits the usefulness of Slack (in our opinions). Without message history its a limited chat. With history, it provides a rich history of searchable content for the community.

Therefore we decided to go with Discord. It is free to use and has unlimited message history that can be searched.

Why didn’t you use Telegram? Discord is mainly for gamers …

Discord allows us to have various channels/rooms where discussions can be broken out into. We have rooms for design, testing, architecture, etc. Using Telegram, this would not be possible.

While Discord is very popular for gamers, it is used widely in various other industries as well.

Code of Conduct

We do our best to model ourselves as responsible stewards of the community and in doing such we have established a code of conduct that all members of the discord server must abide by. Read it here.

As always, please let us know if you have any comments, questions, etc.

-✌️ Donn & Kaushik