When to use "Keep device awake"

728 views
Skip to first unread message

Morten Haughom

unread,
Dec 29, 2011, 12:21:08 PM12/29/11
to Tasker
I'm a little confused as to when to check "Keep device awake". Reading
posts has given me some clues but it is still somewhat unclear.

The best way to get simple yes/no answers would be for me to make some
statements about how I think it works, and then someone here could
tell me if I'm right or wrong:

Is it true that "Keep device awake" must be checked if your task is
using the GetLocation Action
?

Execution of Tasker code continues even after the device falls asleep?
(It seems that it does, looping a popup window with a 5 min Wait
between each popup works)

The only reason to check "Keep device awake" is if you expect a result
that will appear on the screen? (In other words, you don't want your
screen to go dark while you wait for the task to finish and show the
result)

Tasker actions that are "internal", i.e. they don't need to query the
system (OS) to do their job, will continue to execute after the device
has fallen asleep?

All other actions are subject to Android policy on what happens with
code execution when the device falls asleep?

Morten

Pent

unread,
Dec 29, 2011, 12:27:00 PM12/29/11
to Tasker
> Is it true that "Keep device awake" must be checked if your task is
> using the GetLocation Action

Certainly not if you can get a fix within 40 seconds. Otherwise:
maybe, depends if the location provider on your Android version keeps
the device awake or not. I suspect you don't need it these days.

> Execution of Tasker code continues even after the device falls asleep?
> (It seems that it does, looping a popup window with a 5 min Wait
> between each popup works)

When a task does a wait, it lets the device fall asleep and sets an
alarm to wake it up at the relevant time, so you don't need it there.

> The only reason to check "Keep device awake" is if you expect a result
> that will appear on the screen? (In other words, you don't want your
> screen to go dark while you wait for the task to finish and show the
> result)

No, those things are unrelated. The device can be awake with the
screen off.

> Tasker actions that are "internal", i.e. they don't need to query the
> system (OS) to do their job, will continue to execute after the device
> has fallen asleep?

Didn't get that.

If you expect your task to last a while (>40ish seconds), maybe you
have a loop checking a condition or whatever, you might need to check
Keep Awake.
If your tasks work fine, don't worry about it.

Pent

Morten Haughom

unread,
Dec 29, 2011, 12:40:34 PM12/29/11
to Tasker
You're right, I won't worry about it anymore :)
Tasker has awakened an urge to understand the nuts & bolts of the
Android platform. Haven't felt like this since MS-DOS 5.0 was
released. So I can't promise you that I'll stop asking these kind of
questions in the future. I do promise to search for answer extensively
before posting though :)
Thanks for swift reply.

Pent

unread,
Dec 29, 2011, 2:14:44 PM12/29/11
to Tasker
> Tasker has awakened an urge to understand the nuts & bolts of the
> Android platform.

http://developer.android.com/guide/basics/what-is-android.html :-)

Pent

Morten Haughom

unread,
Jan 1, 2012, 6:48:00 AM1/1/12
to Tasker
Nice :-)
thanks Pent
Reply all
Reply to author
Forward
0 new messages