Skip to content
AMIT SHEKHAR edited this page Feb 1, 2017 · 4 revisions

Fast Android Networking Library

Build Status Android Arsenal License

About Fast Android Networking Library

Fast Android Networking Library is a powerful library for doing any type of networking in Android applications which is made on top of OkHttp Networking Layer.

Fast Android Networking Library takes care of each and everything. So you don't have to do anything, just make the request and listen for the response.

Why this library

  • Recent removal of HttpClient in Android Marshmallow(Android M) made other networking library obsolete.
  • No other single library do each and everything like making request, downloading any type of file, uploading file, loading image from network in ImageView, etc. There are libraries but they are outdated.
  • No other library provided simple interface for doing all types of things in networking like setting priority, cancelling, etc.
  • As it uses Okio , No more GC overhead in android application. Okio is made to handle GC overhead while allocating memory. Okio do some clever things to save CPU and memory.
  • As it uses OkHttp , most important it supports HTTP/2.

Requirements

Fast Android Networking Library can be included in any Android application.

Fast Android Networking Library supports Android 2.3 (Gingerbread) and later.

Fast Android Networking Library supports

  • Fast Android Networking Library supports all types of HTTP/HTTPS request like GET, POST, DELETE, HEAD, PUT, PATCH
  • Fast Android Networking Library supports downloading any type of file
  • Fast Android Networking Library supports uploading any type of file (supports multipart upload)
  • Fast Android Networking Library supports cancelling a request
  • Fast Android Networking Library supports setting priority to any request (LOW, MEDIUM, HIGH, IMMEDIATE)
  • Fast Android Networking Library supports RxJava

As it uses OkHttp as a networking layer, it supports:

  • Fast Android Networking Library supports HTTP/2 support allows all requests to the same host to share a socket
  • Fast Android Networking Library uses connection pooling which reduces request latency (if HTTP/2 isnโ€™t available)
  • Transparent GZIP shrinks download sizes
  • Fast Android Networking Library supports response caching which avoids the network completely for repeat requests

Difference over other Networking Library

  • In Fast Android Networking Library, OkHttpClient can be customized for every request easily.
  • As Fast Android Networking Library uses OkHttp and Okio, it is faster.
  • Single library for all type of networking.
  • Supports RxJava -> Check here
  • Current bandwidth and connection quality can be obtained to decide logic of code.
  • Executor can be passed to any request to get response in another thread.
  • Complete analytics of any request can be obtained.
  • All types of customization is possible.
  • Immediate Request is really immediate now.
  • Prefetching of any request can be done so that it gives instant data when required from cache.
  • Proper cancellation of request.
  • Do not cancel a request if completed more than a threshold percentage.
  • Simple interface to make any type of request.
  • Proper Response Caching, hence reducing bandwidth usage.

TODO

  • Integration with other library
  • And of course many many features and bug fixes

CREDITS

Contact - Let's become friend

License

   Copyright (C) 2016 Amit Shekhar
   Copyright (C) 2011 Android Open Source Project

   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

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Contributing to Fast Android Networking

Just make pull request. You are in!