views:

149

answers:

1

Hi,

I have a UILocalNotification in my app but I want to play several sounds after each other. I can't find that my app can solve this, due to that my app is in the background.

So what I want to know is if one can play several sounds and repeat them until the user has pressed "cancel" och "view", or if there is a delegate in my app that can pop the app right back up whenever an "alarm" is triggered.

Regards,
Paul Peelen

+1  A: 

Under iOS 4.0, there are several ways to register your app with the OS for multitasking services so that your app can get some running time in the background. An app can register for background location/GPS logging, VOIP network socket persistance, or background audio recording/playing/streaming, and be giving time in the background. Skype is likely registering as a VOIP service. But an app could also register as an audio player, and play silence until getting notified to play several sounds.

See Apple's Application Programming Guide for details.

hotpaw2
But wouldn't this mean that if I have a alarm app which will register as an audio player... apps like iPod or Spotify will not function when activating my app?
Paul Peelen
The OS will take the audio channel away from your app and give it to the iPod (user foreground task wins). Not sure if this permanently takes away your app's audio background tasking.
hotpaw2
Only one way to find out ;)Do you have some links to tutorials which I might be able to use?
Paul Peelen