iphone - Play sound at specific time while app is in background -


i'm looking way let app play sound @ specific time while it's in background (ios4 multitasking). currently, use local notifications works quite well, except for:

  • the sound not played if phone muted
  • the 30 second playback limit

i saw there's setkeepalivetimeout:handler: it's available voip-apps , since that's not purpose of app, guess apple reject because of this. saw solution "empty" sound being played until it's time has been reached, - ignoring not elegant way, anyways - read this, too, might app rejected.

since there few alarm clock apps i'm looking for, wonder how implemented functionality.

thanks hints in advance!

if seek solution approved apple, you're right can't use setkeepalivetimeout:handler , if - can't set timeout that's smaller 600 seconds, guess won't of great use anyway (besides it's not guaranteed fire event remotely close timeout specified. example, set 600 seconds , event fired 360 seconds..).

about playing silent sound, except waste of battery, if you're app has legitimate use background audio (if you're implementing alarm clock, that's pretty obvious), don't see reason app rejected, long don't try use other background features (gps signal, voip handlers, etc).

here's 1 example app used "feature" benefit: http://tapbots.com/blog/pastebot/pastebot-music-in-background

about other methods, can in thread: how start playing audio when in silent mode & locked in ios 6?

on personal note, it's not easy cope background policies of apple. me , company had (have?) hard time maintain simple voip connection due limitations. best advice try less possible in background can. if uilocalnotificaion solution suits you, you'll should stick , live limitations.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -