I'm using MPMusicPlayerController and I have implemented skip track and previous track controls to control the music playback. When I reach the end of an album/playlist that is in the now playing list. The App no longer skips track nor goes previous track.
Example: First track of album, tap on previous track the app would stop responding and skip track/play/previous track will no longer respond.
Example: Last track of album, tap on previous track the app would stop responding and skip track/play/previous track will no longer respond.
I noticed on the iPod app itself, after it finishes a playlist it'll return to the playlist selection view or it'll return to the album selection view. What state is the MPMusicPlayerController in at this point of time? How can I use it to launch the iPod app when I encounter such a state within my App?
Based on my experience, the state becomes
MPMusicPlaybackStateStopped
In this state, playlist is actually gone, and needs to be update by playing iPod Music player again. You may useMPMusicPlayerControllerPlaybackStateDidChangeNotification
to evaluate the condition of the player and do the action of your choice. Notification Programming Topics: http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Notifications/Introduction/introNotifications.html#//apple_ref/doc/uid/10000043i