Menu

Robolectric tests running in Android Studio

Been playing a lot with testing lately, but one thing that bothered me a lot was the shitty hacks one has to do for being able to run Robolectric tests within Android Studio.

I'm sure most of you have encountered this annoying exception: java.lang.RuntimeException: Stub!
There are some useful posts talking about this in Stack Overflow, but the bottom line is always the same: either you have to edit manually the .iml file or you switch to IntelliJ. Either way, you have to make compromises. And that sucks.

At least, for me, none of that stuff worked. But then I found out about gradle-robojava-plugin. You have great documentation in there too.

I am going to work through an example for a library, though using this in an app would be pretty much the same.

Your project-wide build.gradle file neets the robojava-plugin dependency set up:

buildscript {  
  repositories {
    mavenCentral()
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:1.0.0'
    classpath 'com.kageiit:robojava-plugin:1.1.5'
  }
}

You create a new project (let's call it tdd for example) at the same level of your application or library with only a build.gradle file inside, with these contents (keep in

Joined Yahoo!

It's been a hard road, but I moved to London on November and started working for Yahoo! as an Android Engineer.

I am really excited to be working here. So much to learn, so much to improve. It's like a dream come true :)

This blog update is long overdue, I know, but securing a flat / moving here is hard and took all my time and energy.

Simulador Clínica Londres for iOS and Android

This is the result of my latest freelancing effort. It's an app for a very known spanish plastic surgery clinics, Clínica Londres.

The app itself was very fun to code, because apart from all the usual stuff like news or location, it had this section where you could interact applying some effects to the photos you wanted to upload. Never did that kind of stuff in any app, so it was well worth the effort :)

Simulator Before and after comparison

Ideally this was intended for seeing how you would end up with big boobs or with a better nose, but you can do pretty much anything you want with it. It's done by applying some shaders to the pictures. Really fun stuff.

You can watch the app in action in this video.

Society of Wine Educators for Android

An app I've been working on for some time is finally released. It is a trivia game for wine conoisseurs with a social twist. You can download it from here.

Logo

A couple of screenshots...

Shot1

Shot2

I had a blast programming some of the UI animations in this one, and coding some of the custom views too.

About the content, I am a wine neophyte, to say the least, but this helped me to learn a bit. Two birds with one stone, right?

It seems other app I've been working on is just also about to be released too. It's rewarding to see stuff coming along nicely, after a couple of months of working non-stop.

Time to bump minSdk to 16

It was about time: API levels 14-15 are falling behind pretty quickly.

We can see in this image, from a sample of about 200k sessions, how the 4.0.+ accounts for only ~6% and rapidly decreasing.

SalsaLoL

It's not that I particularly need any API introduced in 16 in a daily basis (except maybe using fontFamily as it is intended to be done), but if we don't keep pushing we will be forever stuck in 14 as we were for years in 8-9.

So, let's go for it and use API 16 as minSdk for the next projects! :)

Going freelance

After almost 3 years coding for Mobivery, the adventure comes to an end. I am really grateful for the time I've spent there, as I've met great people, learned a lot and worked with awesome professionals.

But it's time to start a new adventure.

I have been doing for a couple of months some work on my own apps (the Speed Cameras application for Spain, United Kingdom, Australia and New Zealand and more to come) and SalsaLoL with my friends of Redfive Labs.

I already have some clients lined up for the near future, but of course I'm up for some contracting. You could contact me anytime if you need some Android or iOS consultancy or project that needs to be done.

// I did my part
nacho.setJob(JobFactory.buildJob(Jobs.FREELANCE));

// Now you do yours! :)
JobType newJobType = JobType.CONTRACTING; // or CONSULTANCY or DESIGN  
if (nacho.hire(new AwesomeProject(newJobType))) {  
  client.setProfit(Double.MAX_VALUE);
  client.setHappiness(Integer.MAX_VALUE);
}