Category: Tutorial

  • [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…

  • [TUT] Android Gradle App with Robolectric JUnit tests

    This tutorial will show you the skeleton of an Android application that uses the Gradle build system and runs Robolectric JUnit tests on Android classes. This follows on from my tutorial about JVM JUnit tests, you can have one type of testing without the other. For instance you could bundle all your JVM tests inside…

  • [TUT] Android Gradle App with JVM JUnit tests

    This tutorial will show you the skeleton of an Android application that uses the Gradle build system and runs JUnit tests on java classes. If your here and reading this, I assume you already know Android code runs on Dalvik and the SDK’s used when developing on a computer are stubs. (Hence the Stub! exception…

  • [TUT] Setting up Android Studio & Gradle [windows 7]

    This is a simple walk through of setting up the new Android Studio IDE and Gradle. Gradle is the new build system for all Android projects. Prerequisites: you have a JDK installed. JAVA_HOME is set. (you can test this by typing java -version in a console) warning: This post is very image heavy, so get…

  • [TUT] DayDreams are as easy as counting sheep

    DayDreaming is simple, if you have written an application with an Activity i.e everybody! You should be able to implement a simple daydream with little extra effort. We are going to run through creating one and it will look something like this at the end: (much smoother on a device, this is a GIF representation)…

  • [TUT] Email Feedback from Users (device information)

    I recently updated my McDonalds Calories application and improved the feedback facilities. Whilst I was doing this I realised it would be good to do in all of my apps and therefore wrote this utility class just for the purpose. The idea is to gain more information about the users devices when they send you…

  • [TUT] Validate EditText User Input with Shake Feedback

    I was recently watching the Google App Clinic and noticed one of the apps Zoum Tasks had this really cool feature where when the user enters an email address into an EditText, if it was invalid then the EditText would shake! I thought this was really cool and wondered how it was implemented so I…

  • [TUT] Simple InApp Billing / Payment V3

    Google have released a new version of their In App Billing (Version 3). So I’ve followed suit and updated my tutorial! Eclipse Project Source Code Download GitHub Source Code Repo Link There are a fair few changes, too many to fit into one tutorial but the overview is: – All purchases are now managed purchases…

  • [TUT] Using the camera with a custom overlay

    This tutorial shows you how to use the devices camera inside your application. It also shows how you can have a custom UI for your camera and overlay images on top of the camera preview. I’ll apolgise now my graphics aren’t the best, but they convey the idea and concepts of what is possible. The…

  • [TUT] Networking off the UI thread – SOLID Architecture

    Hi guys, this is a Tutorial Request to show how to architect an app in a S.O.L.I.D design to complete networking tasks. Now I am not an expert at this, but I believe the example does show the signs of a SOLID design. I can also see places where I could have used more interfaces…

  • [TUT] Twitter Feed on an App Widget

    Hi guys, this is a Tutorial Request to show how to create an Android widget that shows a Twitter feed when you give it a search term. The first line of the widget shows the search term, the rest of the widget is used to show the latest tweet in the form “username : tweet”.…

  • [TUT] Animate Removing From a Custom Adapter (ListView)

    Hi guys, this is a Tutorial Request to show how to control your own animations from a custom adapter. The question was a bit vague so I’ve taken it and will show you how to animate a view when you are removing an item from a ListView. Of course ListView is backed by an Adapter,…

  • [TUT] Keep Screen on/awake – 3 possible ways

    This tutorial will show you how to stop the screen timing out for an android activity so you can continue to show some information without user interaction and without the screen going off. Dont use a WakeLock when you don’t have to, unless you specifically need to force the device away (processor and all). A…