-
·
[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] 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] 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…
-
·
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] ASyncTaskLoader using Support Library
I’ve just started learning about Loaders, they’re a way to handle doing tasks off the UI thread. The benefits include having a listener that will inform your fragment/activity when the data your monitoring is changed. They will also account for orientation changes when loading. A brief introduction is written here and it got me up…
-
·
[TUT] Generic One Option Dialog Fragment (with data)
In this tutorial I’ll show you how to create a dialog fragment that can be used for general purpose dialogs where you want to show the user a message and just have one option for them to acknowledge the message. The unique thing about this tutoral is you can add an object to your dialog…
-
·
[TUT] Basic Date Picker
I was just looking on the Android Developer site and the only tutorial they had to show a DatePicker was within a dialog. I didn’t want my datepicker in a dialog, I wanted it embedded into my activity. However I already knew there was a DatePicker XML view that I could use, so I was…
-
·
[TUT] Preloaded images set as phone wallpaper
This is the first request that I’ve done! This tutorial will show you how to display some images within your application from the resources folder, you can browse through these images and choose to set one as your phones wallpaper. Tutorial will go like this: Create XML layout to let you browse your images Create…