You are an Android developer; You know very well how to launch an Android activity and by the time you are reading this you probably did it zillion times. But have you ever wondered why do we do it this way? Why do we use intents to create an activity object? What makes an Activity object so unique and different from any other java object? After all, it’s a java object right? Then where, when and how the “new Activity()” statement actually gets executed?! What happens before an activity gets created? In this article we take a glance at the behind-the-scenes of launching Android activities. I assume that you’re already familiar with Java programming language, OOP principles and Android development fundamentals.
The Data Binding Library (referred to as the ‘DB library’ for the rest of this post) offers a flexible and powerful way to bind data to your UIs, but to use an old cliché: ‘with great power comes great responsibility’. Just because you’re using data binding does not mean that you can avoid being a good UI citizen. I’ve been using data binding on Android for the past few years and this post details some of the things which I’ve learnt along the way.
This is not an article about dependency injection in general or about why we picked library X over Y. Instead this post covers key takeaways of our efforts to modularize Plaid from a dependency injection perspective.
Kotlin 1.3’s experimental inline class feature allows creating type-safe, semantic wrappers around values which are erased at runtime. Database IDs are a perfect use case for this functionality. Combined with SQLDelight which automatically generates model objects and APIs for querying, different table’s IDs become different types which prevent erroneous use.
I first published my app in September 2013. I am still iterating on the app, with 4.0.9 being my latest published version and 4.1.0 under development. With the benefit of time, things have become clearer and there are some things I wish I knew upfront (these are just a collection of thoughts, which I think an Android publisher should think about). (I only first published to the Apple App Store in December 2018, so have no real experience yet – this post is all about Android).