My little software warehouse


Jun 20

How to a timer

Ok, I must confess the title is built to draw people’s attention, because you know, nowdays everything is done in a reactive fashion. RxJava is superhelpful, but if we forget the ecosystem our apps are running into, we risk to forget the proper way to implement certain tasks in Android. Why do we need a whole post about timers? Recently, I had to implement a countdown timer in Android.


Apr 20

Happines is relative

Using relative layout is bad .. or at least they say so. The truth is, it is relatively easy to build complex layouts using RelativeLayouts, but this ease of use comes with a cost: in order to provide that kind of flexibility, RelativeLayout does two measurement passes. There are a lot of talks and posts explaining that if you have nested relative layouts, you’ll end up with many measurement …


Jan 1

Cached rest requests with rxjava

Disclaimer: In this post I am trying to cover a proper approach to a common problem. I am still in the process of wrapping my head around RxJava so what I write here might not be the best way to solve the problem. Cached requests with RxJava Lately I’ve been trying to develop a rest backed app using RxJava. I must admit that once you get in the proper mental mood, RxJava almost feels like …



Sep 13

Testing rxjava observables subscriptions

Testing RxJava While catching up with the latest Android novelties I could not ignore RxJava, which seems to grow in popularity between android developers. If you just heard about it, and you want to get your feet wet, I really recommend Dan Lew’s Grokking with RxJava series as a starting point. RxJava is asynchronous by nature, so unit testing it might seem a daunting at first, especially …


Sep 5

Mocking with robolectric and dagger 2

Why robolectric I’ve been a fan of robolectric since the old days, since when Android Studio was not an option and few developers embraced IntelliJ. I left it a bit behind after the introduction of Android Studio, since its support was far from optimal. Things have changed, and after listening Corey Latislaw advocating its usage during this fragmented podcast episode I wanted to give it a …


Sep 4

Its been a while

.. since my last blogpost. I’ve done a few things in the meanwhile, I wrote a game with LibGdx, I tinkered with various frameworks, but on top of all these things I’ve been taking care of my one (and a half) year old daughter. I do certainly have less time to devote to side projects, but I still like to learn new things and Android is exciting from that point of view.



Sep 1

Dragging with viewdraghelper

While working on my last side gig, a patch to Firefox for Android to allow the urlbar to be dragged in order to show content hidden behind the main view, I had to deal with ViewDragHelper and understand how it works. The final result (please note that the patch is still under review) is something like this: It caused me more than one headache, and for this reason I am writing this post hoping it …


Aug 24

Migrating from blogger to octopress done

It feels a bit like this but when I had to write a new blogpost and had to embed some code snippets into my blogger hosted blog, I got so pissed of that I chose to migrate my existing blog to a github hosted instance of octopress. Jason Jarrett made a pretty nice tutorial about the whole process here. However, I had to change a couple of things and I thought those might be helpful to anybody who …


Apr 8

Generating preloaded sqlite data

Preloading data in Sqlite is a common problem during android development. The most common solutions are: hardcode the insert statements and execute them (possibly inside a transaction) the first time the db is openedplace the data inside a csv file, load it the first time the db gets opened, parse the rows and populate the dbprepare a pre-built sqlite file, ship it along with your app and load it …


Feb 20

Rest interaction in Android

In last December ('13) I was asked to submit a talk proposal for the first Italian Droidcon, which I did. It got accepted, so in Febraury I gave my first public speech speaking of "(O)Authenticated Rest Interaction in Android" in front of real people. This post is meant to be a follow up with the information that can't be found in the slides I hoped to sum all the talk up in a post, but it got …