Keeping app active while phone sleeps?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ctflatt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 243
Joined: Sun Dec 06, 2009 12:24 am
Contact:

Keeping app active while phone sleeps?

Post by ctflatt » Mon May 16, 2011 11:23 am

Good morning, everyone!

I have been working on an app that is basically a timer/calorie counter, with which Bernd has helped immensely.

Is it possible to have an app still active (ie. timers running/alarms firing) if the phone has gone to sleep?

The app I'm working on requires at least 15 minutes of the phone being "on." After those 15 minutes, an alarm sound plays, prompting the user to reset the timer. The problem I am running into is that the phone "sleeps" after 1 minute, and it appears that the timer stops and doesn't restart until the phone is "on" and active again.

I didn't expect this, as the iOS Simulator never "sleeps."

Any suggestions?

:Todd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Keeping app active while phone sleeps?

Post by bn » Mon May 16, 2011 12:22 pm

Hi Todd,

look at "Idle Timer configuration" in the release notes. As of end of January of this yeare you can disable the going idle and stopping the app.

Kind regards

Bernd

ctflatt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 243
Joined: Sun Dec 06, 2009 12:24 am
Contact:

Re: Keeping app active while phone sleeps?

Post by ctflatt » Mon May 16, 2011 12:25 pm

Thanks Bernd.

I'll have a look!

:Todd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Keeping app active while phone sleeps?

Post by bn » Mon May 16, 2011 12:33 pm

Todd,

if you want the app to go on with the timers while it is "in the background" this will not work yet. Livecode iOS apps don't support "background mode" yet. So you will have to keep the app "awake"

Kind regards

Bernd

hliljegren
Posts: 111
Joined: Sun Aug 23, 2009 7:48 am
Contact:

Re: Keeping app active while phone sleeps?

Post by hliljegren » Mon May 16, 2011 11:19 pm

The background task is limited to 10 minutes to most applications so it won't be an alternative even when LC supports it.
___________________________________
MacBook Pro M1 MAX 64 Gb,
LiveCode 10.0.1rc3

Post Reply