use of com.android.volley.toolbox.BasicNetwork in project fresco by facebook.
the class SampleVolleyFactory method getRequestQueue.
public static RequestQueue getRequestQueue(Context context) {
if (sRequestQueue == null) {
File cacheDir = new File(context.getCacheDir(), VOLLEY_CACHE_DIR);
sRequestQueue = new RequestQueue(new DiskBasedCache(cacheDir, ConfigConstants.MAX_DISK_CACHE_SIZE), new BasicNetwork(new HurlStack()));
sRequestQueue.start();
}
return sRequestQueue;
}
use of com.android.volley.toolbox.BasicNetwork in project DesignLibrary by StylingAndroid.
the class VolleySingleton method getRequestQueue.
public RequestQueue getRequestQueue() {
if (requestQueue == null) {
Cache cache = new DiskBasedCache(context.getCacheDir(), CACHE_SIZE);
Network network = new BasicNetwork(new HurlStack());
requestQueue = new RequestQueue(cache, network);
requestQueue.start();
}
return requestQueue;
}
Aggregations