Ir al contenido

Más visitados

Visitados recientemente

navigation

Transmitting Network Data Using Volley

Video

Volley: Easy, Fast Networking for Android

Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster. Volley is available on GitHub.

Volley offers the following benefits:

Volley excels at RPC-type operations used to populate a UI, such as fetching a page of search results as structured data. It integrates easily with any protocol and comes out of the box with support for raw strings, images, and JSON. By providing built-in support for the features you need, Volley frees you from writing boilerplate code and allows you to concentrate on the logic that is specific to your app.

Volley is not suitable for large download or streaming operations, since Volley holds all responses in memory during parsing. For large download operations, consider using an alternative like DownloadManager.

The core Volley library is developed on GitHub and contains the main request dispatch pipeline as well as a set of commonly applicable utilities, available in the Volley "toolbox." The easiest way to add Volley to your project is to add the following dependency to your app's build.gradle file:

dependencies {
    ...
    compile 'com.android.volley:volley:1.1.0'
}
You can also clone the Volley repository and set it as a library project:

  1. Git clone the repository by typing the following at the command line:
    git clone https://github.com/google/volley
    
  2. Import the downloaded source into your app project as an Android library module as described in Create an Android Library.

Lessons

Sending a Simple Request
Learn how to send a simple request using the default behaviors of Volley, and how to cancel a request.
Setting Up a RequestQueue
Learn how to set up a RequestQueue, and how to implement a singleton pattern to create a RequestQueue that lasts the lifetime of your app.
Making a Standard Request
Learn how to send a request using one of Volley's out-of-the-box request types (raw strings, images, and JSON).
Implementing a Custom Request
Learn how to implement a custom request.
Este sitio usa cookies para almacenar tus preferencias específicas de idioma y visualización.

Obtén las noticias y sugerencias más recientes para programadores de Android, que te ayudarán a lograr el éxito en Google Play.

* Campos obligatorios

¡Muy bien!

Sigue a Google Developers en WeChat

¿Deseas explorar este sitio en ?

Solicitaste ver la página en , pero tu preferencia de idioma actual para este sitio es .

¿Quieres cambiar tu preferencia de idioma y explorar este sitio en ? Si deseas cambiarla en otro momento, usa el menú de idioma que se encuentra en la parte inferior de cada página.

Esta clase requiere un nivel de API igual o superior a

El documento está oculto porque el nivel de API que seleccionaste para la documentación es . Puedes cambiar el nivel de API de la documentación con el selector que está sobre el menú de navegación izquierdo.

Para obtener más información sobre cómo especificar el nivel de API que requiere tu app, consulta el artículo sobre Compatibilidad con diferentes versiones de la plataforma.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)