My Top 5 Android Tools of 2017
2017 was an exciting year in Android for me. I spent nearly half of it working on Android projects. In that time, I was able to apply improved Android tools to our existing apps. Here are a few of the Android tools that I believe assisted me the most:
RxJava
Looking back, I’m glad I took the concept of reactive programming seriously. I wrote about it in a post in the past. RxJava enables you to create your apps in a manner that encourages seamless code reuse. For android, it creates some form of assurance that ensures your UI only reacts to changes in data when it is safe to do so. The concept of multi-threading has been made easier too. With a few lines of code, you can switch between the background thread and the main thread in a comprehensible manner; this is even better when done with Kotlin.
RxJava enables you to create your apps in a manner that encourages seamless code reuse.
Kotlin
I’m afraid I’d have to admit that Kotlin has become the best language for writing Android apps (I’m sorry Java). It has removed the ceremony involved in writing Android apps using Java. What I like the most about the language is that ‘null safety’ is built into the language. If you write your apps in Kotlin and you experience a NPE, there’s a 99.99% chance the compiler warned you about it. Another cool thing about Kotlin is that you don’t have to rebuild your project from the scratch because you want to start using the language. Your Kotlin code can exist side by side with your Java code. You can call your Java methods from Kotlin and vice versa.
Firebase Crash Reporting
There’s always a chance that fatal bugs eventually make it to production :(. The Firebase Crash Reporting library helped me to track fatal and non fatal errors on our apps. You don’t need users to submit the bug report first for you to see it in your error reports. Now talking about the reports, it’s as detailed as it can get. I kid you not, you will be able to even see the charging state, battery percentage, device orientation, and other device information in the report. As for the stack trace, if you have obfuscated the code in your app using Proguard, you can upload the mappings.xml file and your stack trace in your report will show you something comprehensible. Firebase Crash Reporting is a proactive error reporting tool for Android. As a side note, we are advised to check out Crashlytics as it’ll be replacing this library soon.
Firebase Crash Reporting is a proactive error reporting tool for Android
Dagger 2
Dependency injection as a pattern makes developers prioritize code modularization and separation of concerns when creating apps. Dagger 2 has fared well as a dependency injection framework for my Android projects. And because it is a compile time dependency injection framework, I wasn’t worried of not satisfying a dependency at run time; all checks are done while compiling. You can read this post to learn more.
Android Architecture Components
I don’t have a production app built using the Android Architecture components yet, but I have gone through a significant portion of the training materials. It’s clear that the Android team at Google created the components with a clear goal: To create a uniform design pattern for building Android apps. LiveData, ViewModel and LifeCycle handling has been added to encourage the MVVM development pattern and to promote reactive programming. The Room Persistence Library was introduced to reduce the stress involved with managing databases on Android apps. My next Android app will definitely be built on this base.
I want to quickly point out that last year, I wrote a similar post about my top 5 libraries of 2016. Most of those libraries were used this year too, with a few exceptions:
- I’ve started to migrate from SugarORM to Realm for my database framework of choice. I’ve been looking at the Room Persistence Library for a while now, I’ll consider it for my next Android project since it is part of the Android Architectural Components.
- Calligraphy is now being replaced by Fonts in XML in my apps. Check out this article by Segun Famisa on how to get started.
- ButterKnife was replaced by the Android Data Binding Library.
That’s all, I hope to learn and apply more this new year. Happy new year folks 🎊.