https://developer.android.com/training/volley/   需FQ

https://developer.android.google.cn/training/volley/

Volley overview

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:

  • 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 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.1'
}

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

Send a simple request
Learn how to send a simple request using the default behaviors of Volley, and how to cancel a request.
Set up RequestQueue
Learn how to set up a RequestQueue, and how to implement a singleton pattern to create aRequestQueue that lasts the lifetime of your app.
Make 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).
Implement a custom request
Learn how to implement a custom request.

https://github.com/kpbird/volley-example

Volley overview的更多相关文章

  1. [原] KVM 虚拟化原理探究(1)— overview

    KVM 虚拟化原理探究- overview 标签(空格分隔): KVM 写在前面的话 本文不介绍kvm和qemu的基本安装操作,希望读者具有一定的KVM实践经验.同时希望借此系列博客,能够对KVM底层 ...

  2. Activity之概览屏幕(Overview Screen)

    概览屏幕 概览屏幕(也称为最新动态屏幕.最近任务列表或最近使用的应用)是一个系统级别 UI,其中列出了最近访问过的 Activity 和任务. 用户可以浏览该列表并选择要恢复的任务,也可以通过滑动清除 ...

  3. 快速Android开发系列网络篇之Volley

    Volley是Google推出的一个网络请求库,已经被放到了Android源码中,地址在这里,先看使用方法 RequestQueue mRequestQueue = Volley.newRequest ...

  4. Android Volley

    1.volley简单的介绍: Volley是一个HTTP库,使Android应用程序变得更加容易,最重要的是,网络 得更快. Vollry 提供以下好处: 1.自动调度的网络请求. 2.多个并发的网络 ...

  5. volley用法之 以post方式发送 json 参数

    需求是这样 我们需要发送一个post请求向服务器要参数.要求是发送的post参数也要是json格式. 简单一点的是这样的: 如果要发送的是这样简单的json格式,我们可以简单的使用map来实现: Re ...

  6. Volley框架使用笔记

    1.初始化请求队列 RequestQueue RequestQueue queue= Volley.newRequestQueue(context); 2.StringRequest 网络请求 Get ...

  7. android之volley学习

    Volley是android的平台通信库,一个新的网络通信框架.Volley 的特点:适合数据量小,通信频繁的网络操作. 获取Volley git 工具使用:git clone https://and ...

  8. Android开发学习之路-Volley源码解析

    从简单的StringRequest入手看看Volley的工作机制. 先简单说下Volley的用法: ① 获取一个RequestQueue mRequestQueue = Volley.newReque ...

  9. Atitit.自然语言处理--摘要算法---圣经章节旧约39卷概览bible overview v2 qa1.docx

    Atitit.自然语言处理--摘要算法---圣经章节旧约39卷概览bible overview v2 qa1.docx 1. 摘要算法的大概流程2 2. 旧约圣经 (39卷)2 2.1. 与古兰经的对 ...

随机推荐

  1. erlang的erl文件的编码方式

    在数据源头的文件第一行加上%%coding: latin-1

  2. winform中文本框,软键盘跟随

    private void textBox1_Click(object sender, EventArgs e) { //Control.MousePosition Point p = System.W ...

  3. Unity3d 动态加载材质方法

    Texture img = (Texture)Resources.Load("LedPicture"); GameObject.Find("Led").rend ...

  4. awk调用shell

    为什么会有这份记录:在帮同学传文件至服务器时,使用了scp,因此链接属性没有建立好,所以向通过awk完成.(更好的是通过tar传递) 附:awk中调用shell的方法. 参考:http://hi.ba ...

  5. springboot+mybatis集成多数据源MySQL/Oracle/SqlServer

    日常开发中可能时常会遇到一些这样的需求,业务数据库和第三方数据库,两个或多个数据库属于不同数据库厂商,这时候就需要通过配置来实现对数据库实现多源处理.大致说一下我的业务场景,框架本身是配置的sprin ...

  6. 让 Oracle 11g 32位运作在64位 Windows 上

    并非不能运行. 本人安装版未曾尝试,但绿色版倒是运行成功了. 很简单:注册表的位置发生了变化而已! 默认(32位.64位),oracle会读取以下注册表的位置:      [HKEY_LOCAL_MA ...

  7. IT部门的“2/8”现状

    专家的研究和大量企业实践表明,在IT项目的生命周期中,大约80%的时间与IT项目运 营维护有关,而该阶段的投资仅占整个IT投资的20%,形成了典型的“技术高消费”.“轻服务.重技术”现象.Gartne ...

  8. Golang优秀开源项目汇总

    https://blog.csdn.net/hackstoic/article/details/52008307

  9. [OpenCV] Samples 09: plImage <==> Mat

    根据需求,转化为不同的颜色格式,split后处理各自通道. plImage <==> Mat 格式转换 Mat --> plImage 简单写法: IplImage copy = m ...

  10. 抓包工具Wireshark

    https://baike.baidu.com/item/Wireshark/10876564?fr=aladdin