Skip to content

🕸️ Using Cronet as Fresco network request library

License

Notifications You must be signed in to change notification settings

limuyang2/Fresco-Cronet

Repository files navigation

Fresco-Cronet

Using Cronet as Fresco network request library

Get

implementation("io.github.limuyang2:fresco-cronet:1.0.1")

Usage example:

    // 1.Create CronetEngine
    val cronetEngine = CronetEngine.Builder(applicationContext)
    // ... other config
    .build()

    // 2.Create CronetNetworkFetcher. 
    // The second parameter is the thread pool, If not parameter, the default is used
    val networkFetcher = CronetNetworkFetcher(cronetEngine, Dispatchers.IO.asExecutor())

    // Fresco config
    val config = ImagePipelineConfig.Builder(this)
        .setNetworkFetcher(networkFetcher)
    .build()

    // 3.init Fresco
    Fresco.initialize(this, config)

About

🕸️ Using Cronet as Fresco network request library

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages