Cancel a request

suggest change
// assume a Request and RequestQueue have already been initialized somewhere above

public static final String TAG = "SomeTag";

// Set the tag on the request.
request.setTag(TAG);

// Add the request to the RequestQueue.
mRequestQueue.add(request);

// To cancel this specific request
request.cancel();

// Later, for example in onStop(), cancel every request that carries this tag.
mRequestQueue.cancelAll(TAG);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents