tags:

views:

96

answers:

2

iPhone developer newbie question:

I'm looking to have my application perform an action when a user stops listening to a track on their iPhone (i.e. presses the stop button). Is it possible to hook into these kind of events (play / pause / stop etc)? If so, which API would I use?

Regards, Andy.

+3  A: 

No, there's not really any way to do that. As far as I know there's no way to tell that a track has stopped, but even if there was your application would have to be in the foreground at the time of the "stop" instruction since there are no background applications (other than Apple's).

Stephen Darlington
+1  A: 

Perhaps KVO would provide the behavior you need.

Key-Value Observing Programming Guide (requires ADC login)

Ryan Townshend