T_C
T_C

Reputation: 3168

Making volley calls when app is in background

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

Answers (1)

Kenan Begić
Kenan Begić

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

Related Questions