A good example of what I\'m trying to accomplish is implemented in the latest version of the Spotify iPhone application for (Pandora seems to have the same
Here's the documentation:
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/RemoteControl/RemoteControl.html
Notice however, that it'll work only when you have active audio session in your application.
I'm using it with AVAudioSession with AVAudioSessionCategoryPlayback category and AVAudioPlayer and "remote controls" work only when I have AVAudioSession active and AVAudioPlayer object created.