title: Response coming from Volley the first time only
body: <p>I'm using Volley to fetch data from server. I have 2 activities, Activity A and B. Both uses Volley and the same Request Queue via a Singleton to fetch data. Everything works fine in Activity A, and when I start Activity B I get Volley's response.</p>
  
  <p>The problem is, if I finish from activity B and move to A, and then start B again, Volley seems to fail to get a response. What am I doing wrong?</p>
  
  <p>My Singleton</p>
  
  <pre><code>public class CustomVolleyRequestQueue {
  
      private static CustomVolleyRequestQueue mInstance;
      private static Context mCtx;
      private RequestQueue mRequestQueue;
      private ImageLoader mImageLoader;
  
      private CustomVolleyRequestQueue(Context context) {
          mCtx = context;
          mRequestQueue = getRequestQueue();
          mImageLoader = new ImageLoader(mRequestQueue, new LruBitmapCache(
                  LruBitmapCache.getCacheSize(mCtx)));
      }
  
      public static synchronized CustomVolleyRequestQueue getInstance(Context context) {
          if (mInstance == null) {
              mInstance = new CustomVolleyRequestQueue(context);
          }
          return mInstance;
      }
  
      public RequestQueue getRequestQueue() {
          if (mRequestQueue == null) {
              Cache cache = new DiskBasedCache(mCtx.getCacheDir(), 10 * 1024 * 1024);
              Network network = new BasicNetwork(new HurlStack());
              mRequestQueue = new RequestQueue(cache, network);
              // Don't forget to start the volley request queue
              mRequestQueue.start();
          }
          return mRequestQueue;
      }
  
      public ImageLoader getmImageLoader(){
          return mImageLoader;
      }
  
  }
  </code></pre>
  
  <p>My Custom request</p>
  
  <pre><code>public class CustomJSONObjectRequest extends JsonObjectRequest{
  
      private Priority mPriority;
  
      public CustomJSONObjectRequest(int method, String url, JSONObject jsonRequest,
                                     Response.Listener&lt;JSONObject&gt; listener,
                                     Response.ErrorListener errorListener) {
          super(method, url, jsonRequest, listener, errorListener);
          //this.setShouldCache(true);
      }
  
  
      @Override
      public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
          HashMap&lt;String, String&gt; headers = new HashMap&lt;String, String&gt;();
          headers.put("Content-Type", "application/json; charset=utf-8");
          return headers;
      }
  
      @Override
      public RetryPolicy getRetryPolicy() {
          // here you can write a custom retry policy
          return super.getRetryPolicy();
      }
  
      public void setPriority(Priority priority) {
          mPriority = priority;
      }
  
      @Override
      public Priority getPriority() {
          return mPriority == null ? Priority.NORMAL : mPriority;
      }
  
  }
  </code></pre>
  
  <p>I perform and add the request on the onStart of my Activity B as follows,</p>
  
  <pre><code>  protected void onStart() {
          super.onStart();
          mQueue = CustomVolleyRequestQueue.getInstance(this.getApplicationContext())
                  .getRequestQueue();
  
          final CustomJSONObjectRequest jsonRequest = new CustomJSONObjectRequest(Request.Method
                  .GET, url,
                  new JSONObject(), this, this);
  
          jsonRequest.setTag(REQUEST_TAG);
          jsonRequest.setPriority(Request.Priority.HIGH);
          mQueue.add(jsonRequest);
          setupRecyclerView(rv, rv2, rv3);
      }
  </code></pre>
  
  <p>My activity B Implements the Response Listener, where I simple parse the JSON and display the data on the UI.</p>
  
  <p>I've been going on about this issue for a quite while, I've learned the tips and tricks of other features of Volley, caching, Ignoring requests, going deep to play around with the library and using it with other libraries. Yet, I still fail to see what I could be doing wrong here. </p>