Back to main page

Navigating Android Development Trends with Smart Bets

This series takes a deeper look at how our engineers build digital financial services. Learn more about how they address large-scale technical challenges at Tala.

By: Shon Shampain, Senior Manager, Android

No one has a crystal ball; so to an extent, the mobile development community is reactive to changes occurring in the greater Android ecosystem. We have to proceed forward, continuously improving our app with this incomplete information. At Tala, we rely on smart bets to guide us. An analogy to poker is appropriate in this case; smart bets are similar to holding a full house. While a full house is a very strong hand in most circumstances, it’s not guaranteed to win, and there are times it will lose. Nonetheless, compounding an expected win rate of 80% or more over and over yields undeniable results. Here’s how we’re navigating three dominant Android development trends.

The Biggest Trend: Compose

A meta trend that affects the industry as a whole doesn’t occur very often and is significant in its impact. It affects the way we develop apps and the technologies development engineers must stay on top of. The most recent example of this phenomenon was the change from Java to Kotlin. Now, in applications aspiring to world-class status, Kotlin is the de facto standard and Java is an anachronism — in just six years!

The consensus opinion of those who use Jetpack Compose is that we have arrived at an infinitely better way of doing UI compared to XML views. This doesn’t even consider major benefits such as reusability and testability. Once you create views in Compose, you are acutely aware of the inferior nature of XML views. This is an example of a smart bet we are making at Tala; it’s not yet a slam dunk, but we feel we’re holding a full house in this instance, especially given our customers’ needs.

Tala serves markets in which our customer base is sensitive to app size, app performance and data usage. For example, many customers in Kenya preferentially utilize USSD as their interface of choice. By converting our views to Compose Multiplatform, we retain the ability in the future to spin up a web app (with the help of Kotlin Multiplatform) that is almost exclusively based on our existing Android codebase.

An Integrated Plan Considers All the Pieces

In enabling a comprehensive strategy anchored by Kotlin, MVVM and Compose, there are a number of supporting trends that made sense for us to incorporate. The first of these is the migration from RxJava to Coroutines and Flows. Coroutines are more idiomatic, and most major third-party libraries are natively supporting this design pattern. Additionally, it has always been somewhat of a concern that RxJava was not designed specifically for Android, and that the greatest powers (such as backflow) of the library were mostly unused in Android. In many ways, while RxJava is a correct solution, Coroutines are emerging to be a more correct solution.

With regard to the usage of activities and fragments (and at this point I can’t help but remember the classic Square blog article “The Fragment LOL cycle”) we are definitely moving back to single activity flows (even entire applications can now be well-built with single activities) complemented by the judicious use of fragments. This decision makes sense on both architectural and performance grounds.

Finally, there are more minor decisions we’re betting on here at Tala, such as modularization of the code into both Android and Kotlin modules, moving to eliminate heavy mocking objects in favor of baking in custom data (commonly referred to as “faking”), and integrated approaches to feature flags and A/B tests.

You Can’t Get What You Want Until You Know What You Want

Putting a stake in the ground and moving towards an objective necessarily involves risk, mostly in terms of opportunity cost and the subsequent issue of either being wrong or objectives changing. However, we are completely at peace with this approach because we know it’s impossible to get it perfect. It’s similar to trying to predict market peaks and dips (which, again, might be broadly considered to be impossible); we’re not trying to hit the extremes; we’re aiming for sustainable growth with a flexible outlook and a willingness to regroup if and when the situation warrants. 

To borrow an overloaded Android term, we at Tala are resolved to realize our intent. Moving forward with Tala-spirit in the service of our mission — and the humble realization that the only static is the constant dynamic reshuffling of priorities and events — is our explicit intention. And moving with intention, even if it’s slightly off-course, always provides feedback. Over time, with persistent iteration, we exponentially move closer to our goals.

Share this article now: