Search code examples
iphoneiosipadobjectipod

Playing Audio in Locking Mode


I am working on Audio related project. I am playing audio, in both case, either my app is active or suspended. I am stuck here, when I play audio and lock my iphone, when I double click on home button, there appears the player controls. I try to play/pause may audio, without unlocking the iphone same as in default ipone/ipod application. Is it possible? If yes then feel free to help. Thanks in advance.


Solution

  • Use Remote Control events

    Remote control events are any event received for the purpose of controlling media. eg iTunes pause/play/next/previous buttons available from double-tapping the home screen button, or remote-control events from play/pause buttons on headphones.

    http://www.sagorin.org/2011/11/29/ios-playing-audio-in-background-audio/