0

I am implementing Spotify in my application.

How can I handle the interruptions like phone call, play song from iPod player etc.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Tinku George
  • 195
  • 2
  • 11

1 Answers1

1

This isn't a CocoaLibSpotify specific question, so you'll find better answers with a more general question.

Apple's guide for dealing with audio interruptions here.

iKenndac
  • 18,730
  • 3
  • 35
  • 51
  • I read the documentation specified. But the interruptions are handled for 'AVAudioPlayer' and 'AVAudioRecorder'. But I cannot implement the delegate methods for the player object of libCocoaSpotify. Please correct me if I am wrong. – Tinku George Mar 20 '13 at 12:38
  • You need to use `AVAudioSession` and the notifications it provides. – iKenndac Mar 20 '13 at 12:56
  • Thank you for your support. As you said I tried AVAudioSession notifications. But there are some problems. The notification 'AVAudioSessionDidBeginInterruptionNotification' shows error in Xcode4.5.1. The notification 'AVAudioSessionInterruptionNotification' has no error. But it is called only when an interruption ended. Also it is not called if we play song from iPod player. Another problem is that this notification is crashing in iOS 5 and below. Can you help me. – Tinku George Mar 20 '13 at 14:50
  • This is outside the scope of this question, and nothing to do with the Spotify API. You should ask another question the different tags to get the answer you need. – iKenndac Mar 20 '13 at 15:30