There are many third-party libraries for Android but several of them are “must have” libraries that are extremely popular and are often used in almost any Android project. Each has different purposes but all of them make life as a developer much more pleasant. The major libraries are listed below in a few categories
Retrofit is an awesome type-safe HTTP client for Android and Java built by awesome folks at Square. Retrofit makes it easy to consume JSON or XML data which is parsed into Plain Old Java Objects (POJOs).
Developed by Jake Wharton, this view-binding library for Android saves you the trouble of writing repetitive code. Butter Knife uses annotation processing to generate boilerplate code for you. It uses @BindView on fields to eliminate findViewById calls, and allows operating on multiple views grouped in a list or array at once.
Taking the approach started in its predecessor, Dagger 2 is a dependency injection framework. It improves code clarity automatically by analyzing dependencies and generating code which wires them together.The library’s development involves contributions by financial services and mobile payment company Square Inc, and Google.
An open-source library for Android, which uses the publisher-subscriber pattern for loose coupling. EventBus is designed to replace the usual Java in-process event distribution with explicit registration. It simplifies code, removes dependencies, and speeds up app development by enabling central communication to decoupled classes with just a few lines.
One thing you don’t want your apps to do is to have objects remain in memory past their limited lifetime. Such events, called memory leaks, can accumulate and cause the app to run out of memory – and then crash. LeakCanary is a memory leak detection library for Android and Java, which helps prevent that.
Would you rather deal with databases or focus on developing a great app? ObjectBox helps you do the latter by optimizing much of the database-related stuff for you. Its developers claim they are bringing technology from NoSQL databases to mobile and that, the resulting performance advantages are rather impressive.
This image downloading and caching library is a central part of any good Android app nowadays. Picasso saves you the trouble of writing from scratch all the code for caching, threading, and image handling. It does all that with just one line of code. Plus, it has the image fade in effect, which is cool and ubiquitous now.
It is important for an app to deliver a unique user experience. The more tweaks on the design you are allowed, the better. The default Android Toast, however, features just one design – a gray popup with white text in it. Well, StyleableToast solves this problem for you by allowing you to choose various styling options for notifications.
Remember that Jake Wharton guy we mentioned a bit earlier? Because he got tired of copying Android’s normal Log class to every little app he was developing, he turned it into a library – Timber. (And a nice pun too.) You can use it to change the behavior of logging – print errors in debug mode, or use analytics in production. The library also comes with embedded lint rules, which help spot possible problems with your app.
Unlike the open-source solutions listed above, JRebel is a paid library. However, it is a very useful tool which can significantly speed up your development build times. Compatible with Android Studio, Gradle, IntelliJ, and other development tools, it enables you to review functional and UI code changes in real time. Its incremental compiler also allows for much quicker performance of code and resource updating.