Marshmallow’s Android 1.0 app is live! 🚀

Here at Marshmallow, we want to make insurance as easy as possible for our customers. Whether they need to update their policy, to get help after an accident or to report a claim, being able to access their policy with the tap of a button can be game-changing. That’s where our brilliant app comes in.

But how did we build our app? Read on to find out…

App showcase

This is part two of .

In part 1, I’ve shown how to move from one big module to three:

The idea behind these three modules is that we can start move our codebase in three directions:

  • everything that it’s shared across module should be moved to core (eg. util extensions, app constants)
  • everything that it’s app level configuration should be moved to app (eg. dagger configuration, navigation)
  • everything that it’s related to one feature should have its own module as a sibling of legacy:

The Abstract Factory Pattern intent is to provide an interface to create families of related or dependent objects without specify their concrete classes.

For examples: let’s imagine that you have to integrate with a chat SDK in your application. Maybe in your company, you have decided to use a specific SDK but haven’t started the integration on the backend yet, also they may change to another SDK at some point, who knows!
At the same time, you know the app requirements, you have the designs, you know, for example, that you have multiple channels and each channel contains multiple messages…

This is part 2 of

In part 1, I’ve shown how to create a custom view to display a circle made of up to five arcs with different colours. In this post I’m showing how to animate the circle showing one arc after arc, to achieve the following:

Ok, so the animation is pretty simple: it happens only when the colours are set, it lasts a specific amount of time, it goes from 0 to 360 degrees, and it draws one arc after the other.

ValueAnimator is a god fit in this scenario because we want to update…

One of my favourite part of writing an Android custom view is when you add value to the UI & UX of an application. Recently, as part of the development of an open source Android (and iOS) application of mine I’ve developed the following indicator:

For some context, MTG Cards Info is an open source Android (and iOS!) application whose main purpose is to browse Magic The Gathering trading cards (

In MTG world, a card can have up to five colours (white, blue, black, red and green) and each deck is made of 60 cards. Each deck is usually…

At my team at Deliveroo, we have recently decided to start using Google Truth instead of Hamcrest for test assertion but considering the number of unit tests in the codebase, migrating all the tests to Truth it’s almost impossible.
We’ve decided instead to have both libraries in the project and use Truth for new tests and do the conversion when touching an existing one. Furthermore, we also wanted to be notified about using Hamcrest when issuing a pull request in order to avoid reviewer to have to check this manually.

So we’ve decided to write a custom lint rule in…

We all have been there. Whatever is the team getting bigger or your app becoming old, there is a point at which to scale up the development of your Android application you start to consider how to modularize the codebase.

When you reach that point things start to become messy, you may start to think to ditch Gradle in favour of Bazel, or you may think to apply one of the many suggestions on how to create modular apps. But then what about app bundles? and instant app? maybe even dynamic feature? Dagger anyone? More importantly, what about a strategy…

In my team at Deliveroo we’ve recently introduced Truth library for unit testing and we are very pleased with it: we like the syntax, the readability and the extendability.

For example when dealing with sealed classes, unit test are not really the best; let’s assume to have a very simple sealed class:

sealed class Food {
class Pizza(val slices: Int): Food()
class Sushi(val pieces: Int): Food()

In a typical unit test, if you want to test that some food is pizza and have 4 slices, you could write something like this:

fun `food is pizza and have 4 slices`()…

If you write Android code, it is very likely that you have some static field to use as key of your Shared Preferences or Bundles and usually in Java they are defined statically:

public class MyAwesomeActivity {
public static final String KEY = "MyAwesomeKey";

If you try to convert this code automatically in Kotlin from Android Studio/IntelliJ, it will generate this:

class MyAwesomeActivity {
companion object {
val KEY = "MyAwesomeKey"

So, for Android Studio/IntelliJ every static field within a class gets converted into a field or a method of the companion object. …

RxJava is a beast. It has a very high learning curve but it lets you do complicated things in very few lines of code which comes with a price: you need to understand how the internal works otherwise it will bite you very hard!
Recently I found a very strange behaviour with the delay operator.
Let’s assume to have an observable that we want to delay before it finishes:

Single.fromCallable {
.doOnSubscribe {
.doOnSuccess {

Nothing strange here, we have a callable that will wait for a delay before returning the…

Daniele Bottillo

Android@Marshmallow (London), technology enthusiast, book reader, TV shows fan, game player, Lego addicted.

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