漩涡敏人 2014-02-11
1. 什么是Volley
在这之前,我们在程序中需要和网络通信的时候,大体使用的东西莫过于AsyncTaskLoader,HttpURLConnection,AsyncTask,HTTPClient(Apache)等,今年的Google I/O 2013上,Volley发布了。Volley是Android平台上的网络通信库,能使网络通信更快,更简单,更健壮。
这是Volley名称的由来: a burst or emission of many things or a large amount at once
Volley主页 https://android.googlesource.com/platform/frameworks/volley
http://www.youtube.com/watch?v=yhv8l9F44qo&feature=player_embedded
来源:
http://blog.csdn.net/t12x3456/article/details/9221611
2.Afinal是一个android的ioc,orm框架,内置了四大模块功能:FinalAcitivity,FinalBitmap,FinalDb,FinalHttp。
通过finalActivity,我们可以通过注解的方式进行绑定ui和事件。通过finalBitmap,我们可以方便的加载bitmap图片,而无需考虑oom等问题
https://github.com/yangfuhai/afinal
介绍
http://www.cnblogs.com/taoweiji/p/3174722.html
http://code.google.com/p/afinal/
其中volly下载
git clone https://android.googlesource.com/platform/frameworks/volley
按照上面的方法,下载时,可能报连接超时,这是因为,android源码,默认下载是用匿名方式的,google为了某种性能和管理目的,做了限制,像一 般的,动态公网IP就 可能下载不了。为此,google提供了认证方式下载。
By default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.
When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).
In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.
The first step is to create a password from the password generator and to save it in ~/.netrc
according to the instructions on that page.
The second step is to force authenticated access, by using the following manifest URI:https://android.googlesource.com/a/platform/frameworks/volley
. Notice how the /a/
directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:
在windows xp中配置环境变量
配置_netrc文件,内容为在google生成的账号与密码
下载