Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using lock screen for my app?

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?

like image 202
Moshe Avatar asked Feb 04 '26 22:02

Moshe


1 Answers

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.

like image 58
Noah Witherspoon Avatar answered Feb 07 '26 12:02

Noah Witherspoon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!