Wednesday, May 11, 2011

Google IO 2011: Day one

Google IO 2011: Day one

Ok, here's my little review of the #io2011. I will try to focus in the technical stuff only.

Amazing stuff. It really feels like Android is taking to the next level.

There were a bunch of announcements with tons of stats but for developers, the important stuff was:

  • Android Honeycomb 3.1 will be rolling out for the Motorola Xoom.
  • ADK
Android honeycomb 3.1 will be available not only for tablets, but for Google TV as well. This means that if you target 3.1 you will be targeting Tablets + TV. Here are the platform highlights.

There is this new resizable feature and it feels like a widget is a must for a tablet app. And what about using widgets in googleTV? It looks like Android's widgets will turn into something important. I never did one so I guess that's something I will need to research about it.

Honestly I was expecting something like the ADK toolkit. This new idea of android accessories open a new world of ideas. I feel that in a couple of months I will start plugging in my cell phone on every appliance at home. I am not very good with electronics but I know someone that will be interesting in doing something with it :)

Talks and office hours
With Matias we decided to avoid most of the presentations for two reasons:
  • They were very crowded
  • We preferred to talk to the Android developers and ppl in general.
We did enjoy a lot of talks so I will try to sum up what we talk about.

Romain Guy (@romainguy)
Some weeks ago, I had a very hard time making ListView work with choices modes. Fortunately I got a nice answer by Mark Murphy. Just to give you an idea, choice modes just work fine if the view returned by the adapter implements the Clickable interface. This means that you need to create a custom view.

I speak to Romain about this and I suggested to throw an exception when the ListView uses a choice mode but the view doesn't implement Clickable. He basically said that the ListView might have different views, eg sections, so it would make sense.

There is not much to do but to understand how ListView works and use it correctly. I suppose I will share some code of this working and how to use it since the ViewHolder pattern is used differently.

Virgil Dobjanschi (@vdobjanschi)
Virgil is the speaker of one of the best io2010 talks. Maximiliano Gomez Vidal (@mgv) gives a nice explanation of Virgil's talk in his blog post: The revenge of the SyncAdapter: Synchronizing data in Android.

The last month we started working in a new honeycomb app and we decided to follow Virgil's advises. I can't share the code but here are some highlights of our approach:

  • One ContentProvider per REST call.
  • One SyncAdapter per REST call.
We reached to some issues with this approach. We had something like:
  • REST call for getting SMS threads.
  • REST call for getting SMS from a certain thread.
I guess you can notice the issue here. SyncAdapters can not have dependencies, or be called in a certain orden so our approach breaks with this. We also didn't want to merge both REST calls in a single SyncAdapter since we didn't want to waste user's bandwidth downloading SMS which were not needed (Typical example of threads in the left and message showing up after clicking in a thread).

So, after explaining everything to Virgil he mentioned that in the past he was doing something similar to us. Different sync adapter per model but he said that after discussing with other android developers he was doing:

  • Only one sync adapter per app.
  • One Content provider per db.
My immediate question was: So you are having long classes with big switch statements? His answer was yes.

I also asked how he was handling manual updates for different models and he answered that he was using intents. I assume that there is a cute switch statement as well :)


The place where we had lunch was huge. We had the chance to share the table with Felipe "java." Lang (@flang). He is part of the GTUG from Santa Fe, Argentina. The @santafegtug.


We ended up going to this talk. The talk was low level stuff but the speakers left a lot of time for questions. One of the best questions was: "If I do an android accessory does it need to get certified? What are the legal terms with all this?" The answer was: "Good question, issue a bug!"

The lack of legal terms was actually one of my concerns during the Google IO.
Music service, cool. Can I upload my music? Is it legal?
Movie rentals, cool. I can cache my movie to watch offline. Is it legal?
Google TV, cool. Is getting banned from some tv providers. Is it legal?

It feels like the technology is there but we are lacking some legal terms and information of what's possible and what's not.

All the ppl in the room got a ADK kit.
In the ADK talk I met Michael Burton (@emmby). He's the author of Roboguice, author of the Groupon's app and a very nice guy.

Nothing very important in this talk but just an excellent panel.
Unfortunately the questions weren't very interesting.

Android office hours
We team up with @emmby and we stayed in the android office hours room. There we had a change to discuss ideas with different people.

Roman Nurik (@romannurik)
Roman was very friendly. I had an issue with how fragments handled touches so I asked him about it. He mentioned that fragments had nothing to do with the View hierarchy. I will have to recheck my code and try to answer my own question.

With @emmby we were both concerned about issues in the android issue list. We asked @romannurik if someone was actually reading them :). He said yes but that they were full of work.

Diana Hackbood
I had the chance of talking to Diana. I founded an issue with the LatinIME while working for SwiftKey. She told me if I knew how to fix it, I could provide a patch in gerrit.

Virgil Dobjanschi + Michael Burton
After speaking with Diana I found that michael was speaking with Virgil. I jump into that conversation since I knew it was going to have a lot of juice.

Michael was saying that he was using AsyncTask instead of going through all the syncAdapter + ContentProvider thing.

Virgil mentioned that doing the content provider and designing the db was the first thing he did but Michael said that you could only do that when the APIs didn't change which wasn't his case.

We three agreed that the documentation for SyncAdapters was lacking and even when you understand it correctly, it was a lot of work. I take advantage of the discussion and asked Virgil if he tested some kind of framework like DB4O for his approach. He said that we wasn't willing to replace Sqlite since he could add performance tweaks easily. I guess it's something we should test out with @mgv and blog about :)

Rallat (@rallat)

At the end of the day we met Rallat. Rallat is a GTLUG member from Spain. He is also in charge of, a spanish android site.

Unfortunately he told me that he was changing the dates of the Spain's Droidcon.

After party

The after party was incredible. Lot's of good food and drinks. Nice music and even a bugdroid dancing techno music.

Pretty Good for a first day!

Update: Review of the second day.

PS: Blogger needs an offline chrome app. I am in the plane right now and I am not able to save my writing :(

PS2: My flight is leaving!


  1. Nice review! Looking forward to play with the ADK :D

  2. seems like you had a lot of fun