andro
andro

Reputation: 1007

Volley cancel all task when back press

i am using volley and in success i am doing some task

viewPager.setAdapter(PagerAdapter);

the problem is when i press back it continues task then it crashing as activity is finish ..any way we can cancel it like asynctask .like activity.isfinishing something

Upvotes: 0

Views: 716

Answers (1)

Dalma Racz
Dalma Racz

Reputation: 149

If you store your requests in a request queue you can call mRequestQueue.cancelAll(this) or you can assign tags to your requests and cancel them by tag.

Upvotes: 0

Related Questions