Sign in

Principal Software Engineer at Trade Me, Part-time Mechanical Keyboard Engineer
Constructing Activities before Android 9 Pie

Dependency Injection (DI) is a common pattern used in all forms of development for a number of reasons. Thanks to the Dagger project, it’s taken off as a pattern used in Android development. Recently changes in Android 9 Pie have meant that we now have more options when it comes to DI, specifically with the new class.

Dependency Injection is huge when it comes to modern Android Development. It allows for less code overall when trying to get reference to services you share across classes, and decouples components nicely in general. In this article, we’ll be focussing on Dagger…


Building an Android app in 2008. Source: Pixabay

Welcome to the third instalment in this series of byte-sized blog posts, where we look at Android Then and Now. We’ll go through bits and pieces of Android development that have changed, and look at why and how they are what they are today in less than five minutes of reading. We’ll cover things like layouts, dependency management, background work, camera usage, navigation and much more!

Today we’re looking at Navigation, from to s.

Multi-Activity

Multi-Activity navigation is where it all started. An gives you access to a , and the intent system lets you move between Activities without…


Hello, this is 2020 speaking. Please stop using AsyncTask. Source: Upsplash

Welcome to the second instalment in this series of byte-sized blog posts, where we look at Android Then and Now. We’ll go through bits and pieces of Android development that have changed, and look at why and how they are what they are today in less than five minutes of reading. We’ll cover things like layouts, dependency management, background work, camera usage, navigation and much more!

Today we’re changing tack, and looking at a style of programming which is slowly becoming less prevalent in Android development: Callbacks.

Callbacks are cool

Callbacks are all over the place in Android Development. That’s simply because they…


Found on Upsplash

Earlier this week I mentioned to a colleague that for the longest time s were discouraged in Android Development. To developers new to Android this fact is apparently pretty mind-boggling — just look at the code we write today with Kotlin! Android development has changed a lot over the years, and looking back at things like enums shows just how far Modern Android Development has come.

Join me in this series of byte-sized blog posts where we look at Android Then and Now. We’ll go through bits and pieces of Android development that have changed, and look at why and…


View Binding is an upcoming feature in Android, available in Android Studio 3.6 Canary 11+ which allows you to more easily interact with Views. It’s quick and easy to enable, and allows for type-safe view access. We’re likely all going to be using it in Fragments. Let’s explore how we can use it, in a safe and easy way!

View Binding in Fragments

Let’s take a look at the example from the View Binding Documentation. First we define some layout file:

result_profile.xml

<LinearLayout ... >   
<TextView android:id="@+id/name" />
<ImageView android:cropToPadding="true" />
<Button android:id="@+id/button"
android:background="@drawable/rounded_button" />
</LinearLayout>

This then generates a “binding” class, . This…


Tools to help you configure your application

If you work on an application which uses Firebase Remote Config or something similar, you’ve probably wanted to test remote changes and run in to some trouble. Making sure config changes work before shipping them to the public can be painful without complex bespoke solutions. We wanted to make it easier for both our developers and our testers, so we developed Konfigure.

What is Konfigure?

Konfigure makes the use of tools like Firebase Remote Config easy by simplifying what it takes to wire up properties to actual remote values, saving you time and making things tidier. It’s built for extension, and can do…


In the previous articles we’ve seen what property delegation is, how we can use it to seperate concerns, and implement complex getting and setting functionality. This article takes a different approach, looking at a real world problem and evaluating a bunch of different solutions. In this article we’ll see how Property Delegation, in some cases, can be comparable to Dynamic Proxies and Annotation Processing + Code Generation.

Something which I’m sure is configurable

Configuring Android Apps

One common component required for large Android applications is some form of application configuration. This allows developers and product owners to roll out or tweak features remotely, and measure user impact. One choice…


In the first entry of this series we looked at Kotlin Property Delegation in its most basic form, the and . These provide a simple way of us extracting getter and setter functions into a separate, portable class. As we saw in the last post, there are some things we haven’t used yet — the , and parameters. In this article we’ll look at what we can do with these, and put them together into useful property delegates.

A closer look at

Let’s first have a look at the definition of , to get an idea of how these extra parameters come…


A Kotlin Property IRL

Kotlin is an extraordinary language, which is gaining traction at an incredibly fast pace. From it’s 1.0 introduction in February of 2016, it’s quickly become the primary language for Android development for a lot of people.

In this series of short posts, we’re going to explore one specific part of Kotlin which I think is underutilised — Kotlin Property Delegates. We’ll start with the basics, go further to see how far we can take them, then compare them to what we had in Java.

What is Delegation?

Delegation is the act of delegating, defined by a quick Google Search as

Delegate: entrust (a…


Trade Me is an old company, about 20 years old. Throughout its time it’s been one of the largest eCommerce sites in New Zealand, allowing kiwis to connect and trade goods in a safe manner. Recently we’ve reached a huge milestone — more than 2 billion listings created on the site since Trade Me’s inception. Just over 2 billion actually, 2,147,483,647…

Google I/O 2019 introduced In-App Updates in Android via the Play Core library. Using it you can ensure users keep up to date by prompting them passively, and you also have the ability to force the user to immediately…

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