Wondering about iOS background tasks

Mark Wilcox mark at sorcery-ltd.co.uk
Tue Oct 4 04:13:59 EDT 2016


On Mon, Oct 3, 2016, at 06:17 PM, William Prothero wrote:
> Folks:
> My currently finished app needs to run continuously, as it must play a
> series of audio files. I found that, in iOS, audio will play when the app
> goes to the background, but the app is only completing the current audio
> file and the next one isn’t loaded, because the app isn’t really running.
>  I solved this by setting mobileLockIdleTimer. This keeps the app in the
> front and it is what I want. Problem solved.

Just FYI, mobileLockIdleTimer will prevent the device locking and
turning off the screen, which is a real battery killer. A mobile device
can play audio with the screen off for many, many hours. Of course if
you actually need the screen on, no problem.

On iOS, assuming you have the audio background mode set (in the
info.plist), the device doesn't suspend your app while it's still
playing audio. It may be the case that the way LiveCode works with audio
APIs, or the way you're using them, means you stop playing between
tracks for too long, so the system assumes the audio is finished. Might
be worth further investigation.

-- 
  Mark Wilcox
  mark at sorcery-ltd.co.uk






More information about the use-livecode mailing list