Netroid is a Http Framework for Android that based on Volley
Alternatives To Netroid
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Cpp Httplib9,185
13 hours ago1August 03, 202215mitC++
A C++ header-only HTTP/HTTPS server and client library
Async Http Client6,0761,83146813 days ago126October 13, 201690otherJava
Asynchronous Http and WebSocket Client library for Java
Urllib33,31337,7175,5403 hours ago71March 16, 2022119mitPython
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more.
Reading Code Of Nginx 1.9.23,211
2 years ago11gpl-3.0C
5 months ago130bsd-3-clauseC++
A modern C++ network library for developing high performance network services in TCP/UDP/HTTP protocols.
7 months ago59otherC
C library to create simple HTTP servers and Web Applications.
Restclient Cpp1,412
6 months ago28mitC++
C++ client for making HTTP/REST requests
a month ago26mitC++
A Header-Only cross-platform C++ TCP network library . We can use vcpkg( install brynet.
Volley Demo903
7 years ago4Java
An demonstration of Volley - HTTP library announced by google in I/O 2013. Illustrates, JSONRequest,StringRequest, Image caching.
Tiny Http792177832 months ago29February 25, 202244apache-2.0Rust
Low level HTTP server library in Rust
Alternatives To Netroid
Select To Compare

Alternative Project Comparisons

Netroid library for Android

Netroid is a http library for Android that based on Volley, That purpose is make your android development easier than before, provide fast, handly, useful way to do async http operation by background thread.


1. Base async http interaction.

As most android apps done, Netroid allow you to retrive data over http with background thread, exchange invoke result to main thread.

2. Response cache base disk.

Netroid can cache your http response to disk and the cache expire time was configurable.

3. Image loading solution.

Provide a powerful solution of image load, used LruImageCache as bitmap memory cache.

4. Big file download solution.

Provide file download management, allows create, pause, continue, discard operation with download task, also download progress callback.


When Netroid startup, it create lots of thread that amount specify by developer, each thread will block with Request Queue, after a new request comes, whether thread will be awake then perform http operation, finally it back to block status if that perform is done.

Basic usage

The main entry of Netroid is RequestQueue, we highly recommnd you init it with Application and always let it stand with singleton :

public class YourApplication extends Application {

    public void onCreate() {

        // you can choose HttpURLConnection or HttpClient to execute request.
        Network network = new BasicNetwork(new HurlStack(Const.USER_AGENT, null), HTTP.UTF_8);

        // you can specify parallel thread amount, here is 4.
        // also instance the DiskBaseCache by your settings.
        RequestQueue mQueue = new RequestQueue(network, 4,
            new DiskCache(new File(ctx.getCacheDir(), Const.HTTP_DISK_CACHE_DIR_NAME), Const.HTTP_DISK_CACHE_SIZE));

        // start and waiting requests.


In anywhere, the only one you should do just take the RequestQueue instance, then simply add your request instance into RequestQueue :

StringRequest request = new StringRequest(url, new Listener<String>() {
    ProgressDialog mPrgsDialog;

    public void onPreExecute() {
        mPrgsDialog =, null, "loading...", true, true);

    // cancel the dialog with onFinish() callback
    public void onFinish() {

    public void onSuccess(String response) {
        Toast.makeText(Activity.this, "response is : " + response, 2000).show();

    public void onError(NetroidError error) {
        Toast.makeText(Activity.this, error.getMessage(), 2000).show();

    public void onCancel() {
        Toast.makeText(Activity.this, "request was cancel", 2000).show();

// add the request to RequestQueue, will execute quickly if has idle thread

Do not forget add internet permission to the AndroidManifest.xml file :

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


Similarly, ImageLoader should be singleton and also init with Application :

public class YourApplication extends Application {

    public void onCreate() {

        RequestQueue mQueue = ...;

        // SelfImageLoader is your implementation that extends by ImageLoader.
        // you can create a memory cache policy within ImageLoader.
        ImageLoader mImageLoader = new SelfImageLoader(
            mQueue, new BitmapImageCache(Const.HTTP_MEMORY_CACHE_SIZE));

    // the method you'll perform when you want to fill a single ImageView with network image.
    public void displayImage(String url, ImageView imageView) {
        ImageLoader.ImageListener listener = ImageLoader.getImageListener(imageView, 0, 0);
        mImageLoader.get(url, listener, 0, 0);

    // we bring you the NetworkImageView to load network images when it's inside of ListView or GridView.
    public void displayImage(String url, NetworkImageView imageView) {
        imageView.setImageUrl(url, mImageLoader);



As always singleton, FileDownloader would be the same :

public class YourApplication extends Application {

    public void onCreate() {

        RequestQueue mQueue = ...;

        // specify the parallel download task count, less than 3 is recommended.
        FileDownloader mFileDownloader = new FileDownloader(mQueue, 1);

    // add a new download task, take the DownloadController instance.
    public FileDownloader.DownloadController addFileDownload(String storeFilePath, String url, Listener<Void> listener) {
        return mFileDownloader.add(storeFilePath, url, listener);


With DownloadController, you can get the task status such as waiting downloading, finish, also you can trun the task to pause, continue, discard status. the Listener.onProgressChange() will inform you the download progress.


Download the latest JAR or grab via Maven :

  <version>(insert latest version)</version>

For Gradle projects use :

compile ' latest version)'

At this point latest version is 1.2.1.


For more detail about what Netroid can do, pay attention to the docs, that written by chinese.

Sample Application

To be straightforward, we build the sample apk, you can try all features without any source code.


Copyright 2013 Vince Styling

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
Popular Http Projects
Popular Thread Projects
Popular Networking Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.