KMM’s the latest kid on the block when it comes to building mobile. At Octopus Energy we’ve been experimenting with KMM for the last ~9 months and have built an app from the ground up using the technology. So what’s it all about? And should you be giving it a shot?

This post’s intended as a conceptual overview of KMM, and in the following few posts i’ll go into details of how we’ve found it to work in practice.

Developing mobile apps

When it comes to building mobile you’ve historically had a selection of options that fit into two main categories. …


Written as of beta01. Compose is evolving rapidly so some syntax may have changed.

App architecture has come a long way in Android world over the last decade. From god activities to MVP to MVVM to MVI with a sprinkling of event buses, clean architecture, and a variety of other patterns along for the ride.

With Jetpack Compose likely hitting stable sometime in 2021 we can assume the next few years will bring a selection of new patterns to Android as declarative UI changes the way we develop apps.

This articles an experiment looking at how the architecture patterns we’re…


Written as of alpha09. Compose is evolving rapidly so some syntax may have changed.

In part 1 I took a look at how lists work in Jetpack Compose — the new UI framework for Android. Now I’m going to take a look at how these list elements come together in reality with a simple todo list.

Architecture

Because of the data driven approach of Jetpack Compose, architecture patterns which rely on returning a listenable stream of data to the view work quite well. For this sample I’ll use and MVI style pattern.

Listening to the ViewState

For now lets rely on Activity/Fragments to act as…


Written as of alpha08. Compose is evolving rapidly so some syntax may have changed.

Edit — updated syntax with alpha09 changes

If you’ve developed for android you’ve inevitably come acrossRecyclerView, it’s a massive improvement over ListView which came before, but still pretty far from fun. Making a RecyclerView involves a messy pile of boilerplate — often difficult to re-use between screens — and complexity even for basic tasks, like headers, item callbacks, and multiple item types.

How does Jetpack Compose make lists simpler?

Creating a list in compose

Creating a list in compose is ridiculously easy. No adapters. No view holders.

All you need…


Depending who you speak to, putting @Inject on a constructor is either akin to whipping your own grandmother or is such a blindingly obvious thing to do that the question is ridiculous.

But which is right?

The Bobites

These folk have been fully converted to the teachings of Uncle Bob — the father of clean code and clean architecture. Abstraction is our redemption and those who choose to ignore abstraction will burn in the fiery pits of hell.

Or, more simply, Dagger is an implementation detail — a third party library. Our codebase should be able to function regardless of how DI…


This series takes a basic MVP app using Retrofit and RxJava to display a list of Github repositories; and converts it into a modern Android app — along the way it will give an introduction to a variety of techniques used when architecting Android apps, explain why those techniques are used, and perform a few experiments to boot.

If you just want to see the code go here the repo will be updated as the series progresses.

Part 1 — Simple dependency injection with Dagger

Part 2 — Converting Presenters into ViewModels

Part 3— Single activity architecture + some funky…


This series takes a basic MVP app using Retrofit and RxJava to display a list of Github repositories; and converts it into a modern Android app — along the way it will give an introduction to a variety of techniques used when architecting Android apps and explain why those techniques are used.

If you just want to see the code go here the repo will be updated as the series progresses.

Part 1 — Simple dependency injection with Dagger

Part 2 — Converting Presenters into ViewModels

Part 3 — Single activity architecture

To follow along, this is the project after…


It’s coming up to the end of 2020 and a seismic shift has happened in the application world — on a par with the migration to the cloud. The shift leads to a decrease in the cost of application development by an order of magnitude — the ramifications of which will be felt for years to come

A true cross platform tool

At the beginning of 2020 Kotlin 1.4 was released and Kotlin Multiplatform moved out of beta.

Up until this point the holy grail of write once, build for everything has been elusive. Despite a wealth of cross platform tools (phone gap, ionic, xarmin…


This series takes a basic MVP app using Retrofit and RxJava to display a list of Github repositories; and converts it into a modern Android app — along the way it will give an introduction to a variety of techniques used when architecting Android apps and explain why those techniques are used.

If you just want to see the code go here the repo will be updated as the series progresses.

Part 1—Simple dependency injection with Dagger

Part 2 — Converting Presenters into ViewModels

Part 3 — Single activity architecture

To follow along, this was the initial state of the…


With the release of the Android 11 preview 2 and here it looks like platform behaviour for listening to changes in the keyboard is finally getting added! Under the hood this looks to use WindowInsets, so it’s likely to be backported to earlier versions of Android. THANK YOU GOOGLE!

You want to know, at this moment, if the android keyboard is open. Easy right? Unfortunately not. The android keyboard is a great piece of design, that handles much of its visibility internally — depending on input from the user rather than the developer. …

Ian Alexander

Android Developer at Octopus Energy (We’re hiring!) https://octopus.energy/careers/#/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store