views:

167

answers:

1

I'd like to make my app use the audio buttons on the lock screen while multitasking. (Yes, like Pandora.) What API am I looking to use?

+1  A: 

See the Remote Control of Multimedia docs. Basically, you just need to call -beginReceivingRemoteControlEvents on your shared application instance, then register something (probably your main view controller) as the first responder and implement the -remoteControlReceivedWithEvent: method on it. You will get events both from the lock-screen controls and from the headset clicker, as well as the control buttons to the left of the multitasking drawer. To play audio while your application isn't foremost, you should also check out this information on background audio.

Noah Witherspoon