Volley Java Library (VJL)

Volley is an HTTP library to make networking your Android apps easier and most importantly, faster. Volley is available on  GitHub .

Volley offers the following benefits:

  1. Automatic scheduling of network requests
  2. Running multiple network connections simultaneously
  3. Transparent disk and memory response caching with standard HTTP cache coherence
  4. Supports request prioritization
  5. API request cancellation. You can cancel a single request, or organize cancellations within a request block or scope.
  6. Ease of customization, for example, for retry and backoff.
  7. Strong ordering makes it easy to properly populate the UI with data fetched asynchronously from the network.
  8. Debugging and tracing tools.

Volley excels at RPC-type operations used to populate UIs, such as fetching a search results page as structured data. It integrates easily with any protocol and out of the box (quite revolutionary) supports raw strings, images, and JSON. Supporting the built-in features you need, Volley frees you from writing boilerplate code and allows you to concentrate on the logic specific to your application.

Volley is not suitable for large download or streaming operations, as it keeps all responses in memory during parsing. For large download operations, consider using an alternative such as  DownloadManager .

The easiest way to add Volley to your project is to add it to your build.gradle file:

dependencies {
    ...
    implementation 'com.android.volley:volley:1.1.1'
}

You can also clone the Volley repository and make it a project library:

1. Clone repository

git clone https://github.com/google/volley

2. Open android studio, import the downloaded package and make it a library. Check out the full review on how to create  an Android Library for Project .


Post a Comment

Previous Next

نموذج الاتصال