• [TUT] Creating comments with timestamps like YouTube

    Creating comments with timestamps like YouTube (java.util.Date or JodaTime) This tutorial shows how you can create timestamped messages like the YouTube comments section. What this means is we will convert the timestamp (date) that each message has been saved at into a human readable and rounded format. For instance if today is 2016/02/14 17:00 and…

  • [TUT] Send app data to a web spreadsheet (Google Sheets)

    Have you ever had a spreadsheet and thought it’d be really good if I could get data into this from a mobile app. What a great idea, next comes the thought that this is actually much more effort than it seems. Well not any more, this tutorial explains how you can take input in an…

  • [TUT] Mocking shared preferences to test in isolation

    Below is an excerpt from my book “Learning Android Application Testing” that explains how you can write tests that interact with the Android system using files, databases or shared preferences without corrupting or being affected by the data that already exists. It’s post Christmas and there is a flurry of consumerism whilst the shops do…

  • Use the latest version of any library with Android Studio & Gradle

    Isn’t it annoying whenever you want to add a new dependency to your project you have to know the exact version to add, not any more! This ‘hack’ makes use of the Gradle + syntax that allows you to not specify a version of the application. However using + syntax in your code is dangerous…

  • Enchant your users, without boring them with repetition – Animations

    I hope you know the Android Design Principles, if not shh quick read them here. There is also a great talk on the principles from Google IO, so if you prefer video click this. Here I want to talk about animations in your application. Animations are great, they can create a delightful, enchanting experience. Animations…

  • [TUT] Front Camera Face Detection – with preview

    This is a continuation on my last face detection tutorial (here) that took you through the basics of retrieving the camera and giving user feedback when a face is detected. Including best practice when loading the camera, how to ensure you always release the camera when finished, get callbacks when faces are seen and when…

  • Arrow Logger – Log louder than everyone else

    Recently I’ve been playing round with a few libraries that people share based upon an api or service that they offer. These libraries offer access to data in a controlled way and more often than not require authorisation to use. When I’ve picked up the library I just want to start coding straight away and…

  • [TUT] Front Camera Face Detection – explained

    This tutorial explains everything needed to detect faces with the front facing camera on Android. It also wraps this all up into one class, so that you can do face detection in your activity with two lines of code. At first I had no intention of writing a tutorial as I thought face detection would…

  • [TUT] Locally release an Android Library for JCenter or Maven Central inclusion

    This post will put you on the right path to releasing and Android library to bintray ( JCenter ) or maven.org ( MavenCentral ). It will show you how you can create a maven compatible release of your Android library project. You can then use these files to release to whatever repository you want (in…

  • [TUT] How to run Robolectric JUnit tests in Android Studio

    After my blog post on describing an Android Gradle App with Robolectric JUnit tests. I follow up here with how to run these tests within your AndroidStudio. The outcome being faster feedback from your tests and great IDE integration. Ok here we’ll explain how to create a run configuration that will run all the tests…

  • [TUT] Migrating to AdMob in Google Play Services from AdMob SDK jar

    Google have announced AdMob will now be available from with the Google Play Services library. The issue being they are stopping delivering ads to the AdMob sdk jar from August 2014. I describe here some simple steps to help you migrate. This post assumes you originally were using AdMob sdk version 4 or lower. With…

  • [TUT] Android Gradle App with Espresso Instrumentation tests

    This tutorial will show you the skeleton of an Android application that uses the Gradle build system and runs Espresso Instrumentation tests on Android classes. This follows on from my tutorials about Robolectric JUnit tests & JVM JUnit tests, you can have Espresso tests without Robolectric or JVM tests, but the idea is they all…

  • Creating GIF images from your Android device

    Ever wanted to show an example of your Android app on a website but it only supports image upload. Or you want to tweet a gif of your latest app feature. Now you can! If you have an Android 4.4.2 (KitKat) device you can use Android Studio (ASide) to record a video of your application.…