Top 10 GitHub Open Source Android Libraries to Speed Up Development

3196 Views
|
12 Jul 2017
|
8 min
author avatar
Vitaly K.
Copywriter

Everybody's aim should be to focus on core feature implementation rather than re-inventing the wheel. Time is a priceless resource for developers especially when the deadline is approaching. So in many situations, it makes sense to apply ready-made solutions such as GitHub open source projects that were created with agile development in mind and without bugs in its code lines. 

In this article, we are going to tell you about the top 10 most popular GitHub open source Android libraries for developers.

The pack of standard open source Android projects

Let's consider the pack of popular open source GitHub libraries that are likely used in the majority of Android-based apps.

Retrofit

License: Apache 2.0

GitHub Stars: 20,370

This Android open source project is able to convert REST API into Java interface. Retrofit allows you to write a qualitative code in pure Java by means of using almost any RESTful API.

It is worth mentioning that the core features include dynamically built requests, errors proceeding, and the capability to transfer files. Also, this Git open source library gives you a powerful infrastructure for authentication, and API interaction as well as sending web requests by means of OkHttp.

!

Retrofit automatically converts JSON into objects with the help of another open source Android repository called Gson. All the library's logic is built upon annotations that allow the creation of dynamic requests within a server.

In addition, as for the Android-based library, it is pretty light and relatively easy to use.

Advantages:

  • Easy to use & install
  • Great documentation
  • Lightness  

Disadvantages:

  • Lack of images loading support

Glide

License: Apache 2.0

GitHub stars: 14,600

Loading images is a quite widespread task with Android development. Glide Android open source repository is able to download and display pictures from multiple sources. It also takes care of caching and memory consumption.

However, to find the balance between the quality and memory usage, you need to change Glide's default configuration from RGB-555 to ARGB-8888.

By taking this easy step, you will increase the total quality of images and preserve the balance of memory consumption. To make it clear, take a look at the graph underneath that shows the memory consumption in the analogous open source for Android.

GitHub open source libraries: Picasso vs Glide

Glide's memory consumption in comparison with Picasso

Advantages:

  • Fast loading
  • Low memory consumption
  • GIF support 

Disadvantages:

  • Size in 430 kb

Butter Knife

License: Apache 2.0

GitHub stars: 15,500

As you know, the necessity for using a seemingly repetitive code during the project appears quite often. In order to keep up with a good programming style, you should avoid using so-called boilerplate code. For this purpose, open source Android libraries like Butter Knife were created. This library uses an InjectView annotation to remove some boilerplate and shorten your code.

Advantages:

  • Easy setup
  • Lets you write less code
  • Good performance 

Disadvantages:

  • No Pojo Injection support

Parceler

License: Apache 2.0

GitHub stars: 2,700

Besides Butter Knife, the problem of repetitive code could also be solved by Parceler, Android open source project. GitHub made it possible for developers to easily search for tools like this one that makes code creation easier. Parceler's library generates the necessary wrapper classes, while automatically compiling data. This way, the library allows you to reduce the number of repetitive steps that are needed to achieve the increased performance of Parcelables.

Advantages:

  • Eliminates manual generation of Parcelable code
  • Big base of method count 

Disadvantages:

  • Cannot handle RealmList by default

LeakCanary

License: Apache 2.0

GitHub stars: 14,500

To create some top Android projects, you have to take care of memory consumption. LeakCanary library was designed for detecting and eliminating memory leaks. The problem is that the lifetime of some objects are limited. However, in case the object is held by any chain of references within the memory after its lifetime is over - the memory leaks appear and through time an app will have a lack of memory.

!

Do you want to keep track of the latest IT events? Discover the Top 20 Most Popular Programming Languages of 2017

This is one of the top GitHub projects when it comes to the elimination of memory leaks. The library is able to solve this problem by means of a single code line. After its addition, you are going to get a leak trace as soon as it is detected.

Open source GitHub library: LeakCanary

LeakCanary leaks detection

The results may surprise you since there are up to 94% fewer crashes provoked by OOM errors.

Advantages:

  • Easy to integrate
  • Automatic leak detection 

Disadvantages: 

  • Sometimes produces false positives

Robolectric

License: MIT

GitHub stars: 3,100

This is one of the open source GitHub projects that allows you to launch tests for Android-based applications on a local JVM. This way, it's not necessary to download or install any open source APK, just press a launch button. In turn, JVM makes all the tests required on the emulated Android where you can access all the core features.

It is quite easy to write tests for Robolectric: create a test, write a code, use annotations. In the majority of cases, this library is applied to test the business objects, app's logic, data storage and processing.

Advantages:

  • No need in emulators
  • Support of JUnit 4
  • Quick run of test classes 

Disadvantages:

  • Emulator or a device required when it comes to UI testing

The pack of advanced Java open source projects: GitHub

Now, it's high time to talk about more advanced Java open source projects. GitHub statistics claim that they are mainly popular among some of the best development teams. It is worth mentioning that not all of them come in handy if you are not experienced enough.

Dagger 2

License: Apache 2.0

GitHub stars: 6,800

Among all the open source Java projects, GitHub recommends Dagger 2. This is a library intended to help developers while implementing Dependency Injection patterns. One of the main advantages of the library is a simple setting of complicated dependencies. As you know, the bigger your application is, the bigger the dependencies are. With Dagger 2's library, you can take them all under control.

Moreover, this Android open source project repository facilitates the unit and integration testing as well as code generation. Besides, the size of this library is relatively small if we take its functionality into account.

Advantages:

  • Library's size
  • Good code generation
  • Complicated dependencies are easily taken under control 

Disadvantages:

  • Lack of overrides support

RxJava

License: Apache 2.0

GitHub stars: 23,000

Rx is an open source GitHub project applied for compilation and processing event sequences. One of the difficulties when it comes to the development of reliable applications based on Android, is the dynamism of input data changing. Talking about traditional models of imperative programming, it implies that the values must be set for variables in order for them to be updated.

Let's consider several advantages RxJava library opens up for Android developers:

  • Simplifies the possible chains of asynchronous operations
  • Helps to more clearly define which type of threads should be used for different tasks that contribute to writing a more comprehensible code
  • Reduces the need for state variables that can lead to errors
  • RxJava helps threads to transform, filter or create new data threads by using only a few lines of code 

Disadvantages:

  • Quite complex

EventBus

License: Apache 2.0

GitHub stars: 14,000

This open source Android repository serves as a means of communication organization between different parts of an app. In other words, EventBus allows data to be easily sent from one app's part to another. Contrary to Android's tools for data exchange, this solution differs because of its easy usage, as well as an opportunity to transfer any kind of data in any quantity and without serialization.

!

Are you fond of qualitative open source projects? Take a look at our Android open source music player on GitHub

When you are looking for other features, it is worth singling out Sticky Events, which works with asynchronous threads and more.

Android open source libraries: EventBus

Principles of work

Advantages:

  • Simplified communication between components
  • Tiny library's size
  • Highly performative  

Disadvantages:

  • Easy to cross the edge making your code unreadable

Retrolambda

License: Apache 2.0

GitHub stars: 3,000

This Android open source repository adds the Lambda Expressions support to different versions of Java. Moreover, it helps to get rid of code that makes the syntax more complicated. Retrolambda analyzes the bytecode of compiled classes where it searches for Lambda Expressions, along with other innovations and replaces them with analogs that are already present in Java. This fact opens up numerous opportunities since you can now write less code, and that in turn will adapt to your needs on the stage of compilation.

Advantages:

  • Backporting support
  • Gradle Plugin 

Disadvantages:

  • Does not backport the new Java 8 APIs

How to choose the right open source GitHub project?

Sometimes the answers to the most obvious questions at first glance are the most useful. So, if you are a newbie to open source Android development and all this open stuff is something incomprehensible for you- this section was designed specially for you.

Every time you are going to create a new piece of code intended to power your app's core features, search for specialized resources to discover whether similar solutions exist.

Where to search? You can refer to such sources for help:

  • Search engines
  • GitHub
  • StackOverflow
  • Programmer fellow 

Also, if you have already defined an appropriate open source GitHub library - you can easily find several similar ones and choose the best option after comparing them. For this purpose, just fill in the library's name followed by 'vs' or 'comparison' in the search line and you will see the appropriate autocomplete results.

Fortunately, the web is full of comparative articles that are designed for developers. However, you have to remember that not all libraries are widespread or known at all. So, you are not likely to find many related articles.

The last thing you can do is follow our project's social networks to be aware of all the latest changes or some creators' new projects. Also, you may subscribe to any variety of specialized newsletters or blogs and websites to stay tuned.

If you have any questions - contact our managers to get your free consultation.

Rate this article!

An image An image
Bad!
An image An image
Strange!
An image An image
Boring!
An image An image
Good!
An image An image
Love it!
(1144 ratings, average: 4.84 out of 5)
Latest articles
Back to top
As s part of our team, be ready for:
An image
Competitive Base Salary
An image
Comprehensive Benefits
An image
Great Work Environment
An image
Drug Free Workplace
Tell us more about yourself