I am testing the code in the emulator and an older 2.2 device.
If you run the app from the end of the chapter on a 2.2 device it crashes with a permission error.
You need to add this to your manifest:
The code will run without this in the emulator with the latest API.
I am not sure if this is not required in the emulator or if later APIs handle it differently. Can someone clarify this?