mohabitar
mohabitar

Reputation: 11

iPhone iOS4- playing an alarm in the background?

I am working on an alarm app for the iPhone and I cant seem to figure this out. My question is regarding capabilities of backgrounding. Is it possible for a user to specify a certain time for an alarm to play in my app, say 7:00 AM. The user is using iOS 4, and exits the app, but it is still running in the background. Is there anyway for my app to play a specific sound file at that specified time, 7:00 AM? Or can I order my app to relaunch itself somehow at that specific time. If none of these are possible, what are the closest alternatives?

Upvotes: 1

Views: 1078

Answers (2)

progrmr
progrmr

Reputation: 77191

In iOS 4.0 you can create a UILocalNotification set to go off at a specific time/date.

Upvotes: 1

ceejayoz
ceejayoz

Reputation: 180004

You should use a background (local) notification for this - they can trigger sounds.

Upvotes: 2

Related Questions