Prerequisites

Adding the dependency

Step 1 - Add the jitpack maven in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

Step 2 - Add the dependency to your app's build.gradle file:

    dependencies {
        // other dependencies

        implementation 'com.github.rosariopfernandes:firecoil:0.3.0'
    }

Java 8

Just like Coil, firecoil requires Java 8. To enable Java 8, add the following to your app's build.gradle file:

    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }

        kotlinOptions {
            jvmTarget = "1.8"
        }
    }

Cancelling Requests

The ImageView.load() function returns a Disposable which can be used to dispose the request:

val request = imageView.load(storageRef)

// Cancel the request
request.dispose()

See more usage options under Advanced Usage.