Top 10 useful Android Libraries!

Yashaswi Nellithaya
7 min readMay 24, 2021
source — google image search

In my 6 years of professional career as an Android Developer, I have come across or used over 100+ external libraries that are useful in building the Good, stable android application.

Let’s be honest here, we all need an external library for the smooth functioning of our application, they make our life simple and good.

Below is the list of such Android libraries that I have used personally in most of my applications and found very much useful. Also, I’m listing these libraries based on the Top Usecase that are there in almost all the Android applications

As a additional info, below is the list of factors I consider before choosing any library

  • Popularity and feasibility of the library
  • Credibility of the Author
  • How well library is written and does it serves my purpose completely.
  • Technical aspects involved in the library
  • Does it make your work easier and avoid if adds the complexity.

Retrofit: Networking

  • Connecting to a network and playing around with the network data is one of the most basic features of any Android application. Hence using the best networking library is the most important aspect to consider.
  • Over the past years, a lot many networking libraries like Ion, Volley, etc were developed but if you are an Android developer and have used any of them, I’m sure you probably know how much easy and efficient Retrofit is over these libraries. For those who have never used Retrofit before, I strongly suggest switching. With the RxJava / Coroutine, converter, intercepter, etc support, Retrofit is the best networking library anybody could blindly trust on.
  • For more — https://square.github.io/retrofit/

Glide: Image Loading

  • An application containing the Image view with the dynamic/static image to be loaded is one of the most common use-cases and doing this all with the native android image loader is definitely not easy and feasible. That’s where the image loading libraries come into the picture.
  • There are many such image loading libraries available from quite a famous Picasso to Slight, Ion, ShutterBug, etc and the list goes on, but what’s best in Glide is its numerous features over all of these libraries
  • Glide is best in performance, has caching capability, faster to load, better memory management, etc
  • For more — https://github.com/bumptech/glide

Koin: Dependency Injection

  • Though at the very beginning of the application development most of the developers would not consider using the dependency injector in their application as it’s a quite overwhelming task to integrate at first. But in any Android application aiming for better performance, the dependency injector is the must to have thing.
  • A couple of advantages of dependency injection in an application would be code reusability, ease of refactoring, ease of testing, etc
  • Dagger 2 is the most widely used library across multiple platforms, but its initial integration is definitely not easy to start with, and figuring out the compile-time errors related to Dagger is another headache task. That’s where Koin comes into the picture.
  • Koin is the dependency injector introduced mainly for Kotlin, but it has a huge level of advantage over Dagger when it comes to the integration part.
  • Koin is simple, easy to use, and good at providing the required performance ( Although Dagger had a higher hand on performance). It saves a lot of developer time while compared to Dagger.
  • For more on Dagger2 — https://github.com/google/dagger
  • For more on Koin — https://github.com/InsertKoinIO/koin

Coroutines: Asynchronous Tasks

  • It is the known fact that an Android application necessarily contains async operations for its general functioning. Connecting to the network for the data transactions with the server or connecting to the location etc are the task that is ideal to be performed as an async task.
  • Android/Java by default has AsynTask / runOnUiThread to perform the asynchronous task. But we all know the problems that we face because of AsyncTask not being lifecycle aware and others. Hence majorly two libraries have been introduced for the same purpose i.e RxJava (ReactiveX java ) and Coroutines. Both can be used together and interchangeably, however, if you are using Kotlin Coroutines alone should be sufficient as it has almost all the features required.
  • Rx is a complex library and has a wide range of features beyond asynchronism. Whereas coroutines were introduced to make your project reactive without Rx.
  • Coroutines purpose is to simplify asynchronous and concurrent programming, not specifically forcing reactiveness. On the brighter side most of the famous / widely used libraries now support coroutines to make our life even simpler.
  • For more info — https://github.com/Kotlin/kotlinx.coroutines

Chuck / Stetho: Network inspectors

  • Are you that one frustrated Android developer who gets annoyed over the issues created by your QA team for the issue that aren’t native but with the api that gives you the data and you often have to sit on the debug or logging mode to prove that ? Well then Chuck / Stetho is the right solution for that.
  • Both are simple in-app HTTP inspectors for Android OkHttp clients. What it does is it intercepts and persists all HTTP requests and responses inside your application, and provides a UI for inspecting content of each requests/responses. Additionally Stetho offers you inspect local database integrated in your app
  • They lists downs the api integrated in the particular screen you are in at your android app. This can be configured on your testing environments and can be ignored when its published to production
  • These reduces your debug time and and can be used to easily identify what api you use in the UI and can also identify if any data issue found easily. This been my absolute time server friend.
  • For more info — https://github.com/jgilfelt/chuck
  • For more info on Stetho — http://facebook.github.io/stetho/
source — chuck

Event bus : Communication between the components

  • We often have to communicate between the components of the app for various reason, may be for sharing the data / refreshing the previous screens or other. Traditionally we have many default ways of communicating, be it through intents / bundles or listeners.
  • In this context of communication event bus helps us communicating between the components in as easy way possible, with simple code and loose coupling.
  • It works on the publisher/subscriber pattern where one component publishes the data and other components subscribe and waits for the data to come.
  • Some of the best advantages of Event bus would be easy to implement, faster, very light weight, avoids complex and error-prone dependencies and life cycle issues etc.
  • It also has advanced features like delivery threads, subscriber priorities, etc.
  • The new sticky event bus has advantage over caching mechanism over the published data too.
  • For more info — https://github.com/greenrobot/EventBus

EasyPermissions : Permission handling

  • Every ideal Android app would want one or two permission for the most common functionalities, be it a image to be fetched or location to be accessed or audio to be recorded etc
  • Although requesting permission without the library can be done, we do know the amount of code and check we need to add while implementing which can be done easily with this library
  • EasyPermissions is a wrapper library to simplify basic system permissions logic when targeting Android M or higher.
  • Using this, it is easy to identify if the app has the already has the required permissions or not and can be easily requested if not provided
  • With the use of annotations it’s convenience to handle once the permission is granted
  • For more info — https://github.com/googlesamples/easypermissions
  • For Kotlin support — https://github.com/VMadalin/easypermissions-ktx

Facebook Shimmer : Data loading or progress library

  • Facebook Shimmer is one of my favourite libraries of all. Honestly irrespective of how badly structured your code is ( although I highly believe in the maintainability and coding standards), one thing as a developer I should remember end of the day is how attract the user of my app / more likely how not to irritate him with the bad UI. This is one way to beautify your app while your app is fetching the data from network.
  • Shimmer library was created by Facebook to display an animation when data is loading to make the UI more interesting and beautiful by adding the shimmer effect.
  • Shimmer for Android is implemented as a layout, which means that you can simply nest any view inside a ShimmerFrameLayout.
source- google image search

Firebase Crashlytics : Crash reporting

  • User experience is one major factor in building any app. Nobody going to like a buggy apps or the apps with crashes, it’s obvious factor to irritate the user. However we do fix the crashes when we face while testing, a lot many times few corner cases scenario appear which may result in app crash. To identify such crashes and errors Firebase has come up with the tool to track them down.
  • Firebase Crashlytics is a real-time crash reporting tool. It helps by automatically collecting, analyzing, and organizing your crash reports.
  • Helps you prioritize and fix your most pervasive crashes based on the impact on real users.
  • With the supported dashboard and alert it’s just easy to track where and when your users are facing issues in the app.
  • For more info — https://firebase.google.com/docs/android/setup

LeakCanary : Memory leak

  • Memory leak is a programming error that causes an application to keep a reference to an object that is no longer needed
  • Memory leaks are very common in Android apps and the accumulation of small memory leaks causes apps to run out of memory and crash with an OOM.
  • Although Android studio has a tool to identify and analyze the memory leaks, it does consume significant time to generate report and this whole process is time consuming . ButLeakCanary will help you find and fix these memory leaks during development and report can be observed each time we use the app.
  • For more info — https://square.github.io/leakcanary/fundamentals/

Well these are my top 10 go to libraries. Do let me know about your most used / favourites in the comments. Also what do you think of my list?

Thanks for reading!

--

--

Yashaswi Nellithaya

Software Engineer, Books Addict, Strong believer of Kindness , Compassion and Peace .Smile is my only real identity!