Re: Wondering about iOS background tasks

2016-10-04 Thread Earthednet-wp
Thanks, Henry!
I guess that saves the security risk of having apps run in the background and 
potentially causing security problems. It makes sense.
Thanks again,
Bill

William Prothero
http://es.earthednet.org

> On Oct 4, 2016, at 1:13 AM, Mark Wilcox  wrote:
> 
>> 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
>  m...@sorcery-ltd.co.uk
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Wondering about iOS background tasks

2016-10-04 Thread Mark Wilcox
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
  m...@sorcery-ltd.co.uk



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Wondering about iOS background tasks

2016-10-04 Thread hlowe
Bill,

iOS supports local notifications (as supposed to remote notifications) that
work even if the app that created them is no longer running. See:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/WhatAreRemoteNotif.html

Basically the app creates a local (device) time-based notification and
registers it with iOS using the LC command 'CreateNewMobileNotification'. 
When the local notification date and time arrives iOS will send the
notification back to the app that created it. If the app is not running iOS
will issue a notification alert to the user, providing the option to
automatically launch the app. In LC the app receives a
'localNotificationReceived' message that includes information about the
notification. The app handles this message (and its associated data) to
process the notification alert.

Henry





--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Wondering-about-iOS-background-tasks-tp4709152p4709157.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Wondering about iOS background tasks

2016-10-03 Thread William Prothero
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.

But, in the CreateIT course, one of the lessons is to build a clock. Given my 
understanding of how iOS apps behave when in the background, I don’t see how an 
alarm could be initiated if the app goes to the background. I read on this list 
that Apple doesn’t allow apps to run in the background, but every app that puts 
out some kind of an alarm or notification must be running in some way.

Does anybody have any info that would enlighten me on this subject?

 Best,
Bill

William A. Prothero
http://es.earthednet.org/

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode