How to get my audio app to register in the multitask controls?

 
Try this

- (void) remoteControlReceivedWithEvent: (UIEvent *) receivedEvent {

   
switch (receivedEvent.subtype) {

       
case UIEventSubtypeRemoteControlTogglePlayPause:

           
[self playTapped];

           
break;


       
case UIEventSubtypeRemoteControlPreviousTrack:

           
[self previousTapped];

           
break;


       
case UIEventSubtypeRemoteControlNextTrack:

           
[self nextTapped];

           
break;
default:

           
break;

   
}
 

PlayTapped is the method for playing the music. nextTapped is the method for the next song to be played. previousTapped is for playing the previous track.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>