From Chapter 23 of BNR's Android guide: NerdLauncher