【问题标题】:How to get all of existing requests in Volley?如何在 Volley 中获取所有现有请求?
【发布时间】:2016-07-18 08:42:20
【问题描述】:

我正在使用 Volley 库在我的 android 应用程序中实现网络。我想在我的“RequestQueue”对象中获取所有现有请求。如何实现?

【问题讨论】:

    标签: android networking android-volley


    【解决方案1】:

    您可以从 volley 中获取请求队列,首先您必须将所有请求添加到单个队列中。

    public RequestQueue getRequestQueue() {
        if (mRequestQueue == null) {
            mRequestQueue = Volley.newRequestQueue(getApplicationContext());
        }
    
        return mRequestQueue;
    }
    

    【讨论】:

    • 我想在 RequestQueue 中获取我的请求,而不是获取 'RequestQueue' 对象。
    猜你喜欢
    • 2013-05-22
    • 1970-01-01
    • 1970-01-01
    • 2013-10-25
    • 1970-01-01
    • 2013-03-04
    • 1970-01-01
    • 2021-09-26
    • 2017-05-18
    相关资源
    最近更新 更多