Code that was used as part of my presentation at the Motorola App Forum 2012