Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Latest commit

 

History

History
28 lines (20 loc) · 1.68 KB

2017-05-10-volley.md

File metadata and controls

28 lines (20 loc) · 1.68 KB
layout title category date order disqus
page
Volley
int
2017-05-10 00:43:16 -0700
3
1

Volley is a Java networking queue that supports request queuing and prioritization. Volley isn't particularly efficient for loading images because it copies all data it receives into byte arrays. Although Volley attempts to re-use these byte arrays, it's recycling rate is relatively poor for moderate or large images. As a result, Volley can tend to cause a fair amount of memory churn when used with Glide to load images. Volley is still an appropriate choice if already in use by an app because it allows prioritization across both image loading and metadata RPCs. Volley can also be somewhat more robust in poor network than Glide's default networking library because it includes support for retries.

Typically you will either want to disable Volley's disk cache or Glide's disk cache when using this integration library. If you don't do so, identical data may be kept in both Glide's and Volley's disk caches simultaneously.

How do I include the Volley integration library?

First make sure you've followed the [setup instructions][2] for Applications.

Then add a Gradle dependency on the Volley integration library:

compile "com.github.bumptech.glide:volley-integration:4.11.0"

Adding a Gradle dependency on the Volley integration library will cause Glide to start automatically using Volley to load images for all http and https urls.

For more details on the automatic registration of integration libraries and answers to common questions, see the [About section][1] for integration libraries.

[1]: {{ site.baseurl }}/int/about.html [2]: {{ site.baseurl }}/doc/configuration.html#applications