-
·
[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] Easier / Quicker Generic Collection Creation
Sick of repeating your generics declaration?Sick of repeating your generics declaration? [java] List<SomeObject> listOfSomething = new ArrayList<SomeObject>(); Map<SomeKey, SomeObject> mapOfSomething = new HashMap<SomeKey, SomeObject>(); [/java] For a quick and easy way to create a collection of objects you can do the below. Create yourself a util class: [java] package com.blundell.util; import java.util.ArrayList; import java.util.HashMap; public…
-
·
[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] Create your own CheckStyle check
Android code is just like any Java system, you need to write tests and have automated code review checks. CheckStyle is a way of double checking your Java code. Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to…
-
·
Creating 9 Patch Images – Android Asset Studio
If your here you already know what a 9 patch image is. 9 Patch images are stretchable, repeatable images reduced to their smallest size. You define what regions you want to stretch and where your content is. For background reading take a look at: Simple Guide to 9 Patches The great thing about Android Asset…
-
·
[TUT] Get your app OAuth YouTube API access
This tutorial will explain how to allow a user to sign into YouTube, getting your application authorised so you can use the YouTube API. This will allow you to upload / like / post comments etc for the YouTube user. This uses OAuth in the standard way i.e. requesting and receiving an access token. References…
-
·
Register for YouTube API use
This post walks you through registering for the YouTube API. This is necessary if you want to upload / download videos from YouTube using OAuth. Another way to think of registering is that, it creates a server side representation of your android app that you are going to create, so that Google can recognise your…
-
·
[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…