【发布时间】:2016-07-18 08:42:20
【问题描述】:
我正在使用 Volley 库在我的 android 应用程序中实现网络。我想在我的“RequestQueue”对象中获取所有现有请求。如何实现?
【问题讨论】:
标签: android networking android-volley
我正在使用 Volley 库在我的 android 应用程序中实现网络。我想在我的“RequestQueue”对象中获取所有现有请求。如何实现?
【问题讨论】:
标签: android networking android-volley
您可以从 volley 中获取请求队列,首先您必须将所有请求添加到单个队列中。
public RequestQueue getRequestQueue() {
if (mRequestQueue == null) {
mRequestQueue = Volley.newRequestQueue(getApplicationContext());
}
return mRequestQueue;
}
【讨论】: