Reputation: 3168
I want to make volley calls when the app is in the background: what is the best way?
I mean is it safe to just call addToRequestQueue() directly or it has to be called through service
MySingleton.getInstance(this).addToRequestQueue(jsObjRequest);
Upvotes: 0
Views: 444
Reputation: 1228
Have you considered using GoogleSyncFramework for background data syncing/fetching.
You can use background syncing and you can use volley for request. For your case calling it in background MySingleton.getInstance(this).addToRequestQueue(jsObjRequest);
is safe.
Upvotes: 1