Monday, May 16, 2011

Android Protips at I/O: The Session Video (and How I Presented It)

[Update 16/May: Reposted after Blogger outage]
[Update 2: Working links to the sessions slides are available from here]

Another Google I/O, another jam-packed Android session room. This year they nearly doubled the room capacity for the main Android track making space for 1,000 seats. That still wasn't enough though - once again people were sitting on the floor and lining up to get in.

Android Protips: Advanced Topics for Expert Android Developers

After delivering my Android Best Practices for Beginners for the better part of last year, I was really excited to take things up a notch and deliver some real advanced content. To push things one step further, I presented my session using a pair of Xoom tablets. More on that after the video.

The awesome video content was created for me by an old friend of mine (he's still young, but we've been friends since high school) pandamusk - thanks panda!

How did you do that?

There were a lot of questions on Twitter asking:
  1. What app did I use to do the presentation using an Android tablet
  2. How did I live tweet my own presentation in real time?
  3. How did I not re-tweet everything when the tablet rebooted?
I'm an engineer so (of course) I took this as an excuse opportunity to write an app that does the former and built in functionality to do the latter (and come on — you think I didn't consider the case of having to restart? Please.)

How does it work?

One app, running on two tablets, both running Android 3.1 (with USB hostmode support) connected via Bluetooth.

Tablet one was wired up with HDMI out and a USB-connected clicker let me transition between slides. I added a "finger paint" View with a transparent background on top of the ImageView that displayed each slide which let me do the real-time annotations.

A second device (out of sight on the lectern) showed me my "Speaker View": My speaker notes, the current / next slide preview, my pre-written live tweets, and a countdown timer.

The two devices were paired and connected over Bluetooth, with the speaker view tablet set up as a slave to the presentation device. Whenever the display tablet transitioned slides, it transmitted the current slide to the speaker view tablet. It works the other way around too, so I can transition slides on the speaker view and have the live view update accordingly.

The tweeting happened on the speaker view tablet based on slide transitions (with a button for me to disable it if — for example — I had to restart half way through). I connected this one to a wired ethernet connection using a USB to ethernet dongle to avoid the notorious conference wifi syndrome.

I've got a bunch of ideas I'd like to incorporate (particularly around remote viewing), but ran out of time before I/O to get them implemented.

Can I Get the App? Can I See the Source?

Yes and yes. I need to make a few improvements before I release it on the Android Market and I need to refactor and tidy the code before I open source it. In the mean time I'll do a couple more posts the go into more detail on how each of the components work. Stay tuned.


  1. Whoa. That's even cooler than I thought it would be. Great idea to have the 2nd tablet Speaker View.
    Can't wait to see the source code.

    Great work.

  2. Really really cool app and use of USB host. Can't wait to see the source code ! Oo

    And I really need to buy a Tablet to test these functionnalities !

  3. Fantastic app! I really love it! Just one thing, what about people who don't have two tablets. Wouldn't it be better to have a speaker notes version for phones? Maybe just being able to post to twitter, see current slide and the time. I'm not a UI designer but I think it could be possible. And it could be nice to add gestures, if you slide to the right, next slide, to the left, previouse slide. The problem of using a smartphone is that it doesn't have USB Host :( But there surely are other alternative ways to connect both devices...

  4. @Alberto: Absolutely. A smartphone version is a high priority. Will need a UI rethink, but definitely doable.

    The smartphone wouldn't need USB host mode (that was just to ensure WiFi connectivity). The devices communicate over Bluetooth.

  5. Thank you for this really inspiring talk and that hopefully soon comming app.

  6. Wow, you had some really nice ideas!
    Hope to see the source code soon.

    (Great talk too, by the way!)

  7. So cool! I can see this being really useful if I docked my tablet to an HDMI out and controlled the presentation with my phone! Sweeet!

  8. As a fellow programmer I have to say, THIS IS SO BADASS!

  9. This is a really nice idea and implementation for presenters!

    Well...projector + netbook is still better but for a purely Android implementation, this is pretty good.

    Could it be possible to show notes on one tablet and pull the slides from the same tablet and show those only on the projector?

  10. Hi Reto, I enjoyed this presentation, and I am trying to get the PDF of the slides and related code, but the server is giving a 404 on this link : (the "session presentation" link). It appears to be a problem for other google i/o session notes as well. Any help?

  11. @ratana: I've pinged the webmaster team to fix those links. In the meantime you can get them from a couple of places as listed here:

  12. Awesome presentation!

    You made me see the light several times! awesome tip the one about tracking page views inside catch blocks :)

  13. Very good presentation. Loved the videos! I have watched it twice now looking for more nuggets. I can't wait to be able to examine the source code for the app.

  14. Wow - seriously freaking cool! Can't wait to see the code and try this out...I was at IO and was trying to figure this one out during your presentation (which was also really good!).

  15. Can't wait. This is great.
    Couldn't find any where how to embed video in presentation on a tablet .

  16. Hey Reto, any updates on this software? I am a worship leader at my church and would love to control the presentation from my Tablet!

  17. Superb app! I really really like it! Just one factor, what about individuals who don't have two pills. Wouldn't it be better to have a presenter notices edition for phones? Maybe just being able to publish to tweets, see present fall and enough time. I'm not a UI developer but I think it could be possible. And it could be awesome to add actions, if you fall to the right, next fall, to the remaining, previouse fall.

  18. Is this now available It would be of interest to me to use in church for displaying worship songs and also my sermons i would not mind testing it in that environment please email with info were to get the app