Transmitting Network Data Using Volley

Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster. Volley is available through the open AOSP repository.

Volley offers the following benefits:

  • Automatic scheduling of network requests.
  • Multiple concurrent network connections.
  • Transparent disk and memory response caching with standard HTTP cache coherence.
  • Support for request prioritization.
  • Cancellation request API. You can cancel a single request, or you can set blocks or scopes of requests to cancel.
  • Ease of customization, for example, for retry and backoff.
  • Strong ordering that makes it easy to correctly populate your UI with data fetched asynchronously from the network.
  • Debugging and tracing tools.

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 in the open AOSP repository at frameworks/volley 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 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://android.googlesource.com/platform/frameworks/volley
  2. Import the downloaded source into your app project as an Android library project (as described in Managing Projects from Eclipse with ADT, if you‘re using Eclipse) or make a .jar file.
时间: 2024-10-24 12:22:03

Transmitting Network Data Using Volley的相关文章

跟Google 学代码:Transmitting Network Data Using Volley

这篇博客讲了什么 全文脉络可以看这张思维导图: 准备工作 观看 youtube Google I/O 2013 - Volley: Easy, Fast Networking for Android 使用篇: git clone https://android.googlesource.com/platform/frameworks/volley clone到本地 在开发环境中添加Android Library 发送简单的Request 添加权限 使用newRequestQueue 发送 Req

Android训练课程(Android Training) - 使用Volley传输网络数据(Transmitting Network Data Using Volley)

Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster. Volley is available through the open AOSP repository. Volley offers the following benefits: Automatic scheduling of network requests. Multiple concu

[RxJS] Reactive Programming - Using cached network data with RxJS -- withLatestFrom()

So now we want to replace one user when we click the 'x' button. To do that, we want: 1. Get the cached network data for generating the userList. 2. Then get a random user from the cached data. 3. Showing the user in the list. We have the function to

Linux Http-Lua-Mode MsgPack(network data)

Location: clients -----|---->  proxy gate -----|---->  gserver ||nginx---------------->http-lua-mode nginx-net.api  ===>  URL .POST/GET.Socket and so on.....(role by web server) ||network data ==================================================

[Android P][Network data][Notes1]DcTracker setDataProfile 判断APN modemCognitive and requestNetwork set mApnSetting

一.setDataProfile(apn.modemCognitive->??aosp apn not invoke setDataProfilesAsNeeded??):DcTracker.setDataProfilesAsNeeded    ->for (ApnSetting apn : mAllApnSettings) {    ->if (apn.modemCognitive) {    ->...->RIL.setDataProfile->RIL_REQUES

Android Volley (1)

1. volley的简单介绍 Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster. Volley is available through the open AOSP repository. Volley 是一个HTTP库.它使得android app的网络数据传输更简单,更快. Volley的设计目标就是非常适合去进行数据量不大,但通信频繁的网络

Android官方开发文档Training系列课程中文版:网络操作之网络连接

原文地址:http://android.xsoftlab.net/training/basics/network-ops/index.html 引言 这节课将会学习最基本的网络连接,监视网络连接状况及网络控制等内容.除此之外还会附带描述如何解析.使用XML数据. 这节课所包含的示例代码演示了最基本的网络操作过程.开发者可以将这部分的代码作为应用程序最基本的网络操作代码. 通过这节课的学习,将会学到最基本的网络下载及数据解析的相关知识. Note: 可以查看课程Transmitting Netwo

Android官方文档training中英文翻译目录大全:29篇已翻译,45篇未翻译

Android官方文档training中英文翻译目录大全:29篇已翻译,45篇未翻译 1. Getting Started Building Your First App: 原文: https://developer.android.com/training/basics/firstapp/index.html译文:http://wiki.eoeandroid.com/Building_Your_First_AppAdding the Action Bar:原文:https://develope

进行网络操作——翻译自developer.android.com Building Apps with Connectivity& the Cloud

这节课里面包含了连接网络的基本任务,监视网络连接,包括网络变化,并且让用户可以控制网络的使用.同样表述了如何解析和使用xml数据. 这节课中包含一个展示怎样典型的网络操作的示例应用. 经过这节课的学习,你将会拥有使得android app可以高效地网络下载以及解析数据的能力,与此同时使用最少的网络流量. 提示:要查看Volly请参照 课程Transmitting Network Data Using Volley一节,这是一个使得android app的网络连接更加简单和快速的http库.vol