Android's Doze Feature and How it Affects Tasker

661 views
Skip to first unread message

brent...@gmail.com

unread,
Jan 6, 2017, 8:06:23 AM1/6/17
to Tasker
Hello Community,
     I have been using automation apps (such as Llama) for several months now, but I have noticed problems with events not actually firing when the phone is in doze mode.  Events fire perfectly when the phone is plugged in, which is what lead me to believe doze mode could be causing the issue.  I am running Android 6.0.1 (Marshmallow) and Llama was added to the white list.  Sometimes, an event shows that it fired in the log, such as a profile change (quiet to loud) at a given time, but my profile does not actually change until I wake up my phone.  It's as if the automated action has been put in a queue to be executed upon the phone waking up, or at a Doze maintenance interval.  Would this be typical taker behavior as well?    If I schedule an automated action to occur at a certain time, I want it to actually occur at that time (non upon wake up or at a Doze maintenance interval).  I know Llama is an older automation app that is no longer updated, and I thought that perhaps it does not play nice with doze.  Has anyone experienced issues with events not firing correctly due to Doze?  I would appreciate any thoughts people have regarding Tasker and how it is affected by Doze.  Thanks!

Pent

unread,
Jan 6, 2017, 10:15:44 AM1/6/17
to Tasker

brent...@gmail.com

unread,
Jan 6, 2017, 12:16:07 PM1/6/17
to Tasker
Pent,
     Thank you for your reply.  Your link sounds like the exact problem I am having with Llama.  I didn't know Tasker had a "run in foreground" preference.  Thank you for that.  Do you know what running an app in the foreground does?  Does it prevent the phone from going into Doze mode?  Thanks again!

On Friday, January 6, 2017 at 10:15:44 AM UTC-5, Pent wrote:

brent...@gmail.com

unread,
Jan 6, 2017, 1:29:39 PM1/6/17
to Tasker
One other question...I plan on using some location based triggers for tasks (using the cell tower I am currently connected to).  With Llama, these types of triggers would not work correctly until the phone was brought out of Doze.  Does anyone know if running Tasker in the foreground will solve this problem as well?  Thanks again for the thoughts!

Pent

unread,
Jan 7, 2017, 5:06:04 AM1/7/17
to Tasker

     Thank you for your reply.  Your link sounds like the exact problem I am having with Llama.  I didn't know Tasker had a "run in foreground" preference.  Thank you for that.  Do you know what running an app in the foreground does?  Does it prevent the phone from going into Doze mode?

No, it gives the service more priority, helps with many issues.

The most relevant Tasker option for Doze is Reliable Alarms.

Pent

brent...@gmail.com

unread,
Jan 9, 2017, 7:07:27 PM1/9/17
to Tasker
Thanks again Pent!  I played with Tasker most of the weekend and I am learning a lot.  I have another Doze related question concerning reliable alarms and profiles with a repeating time context.  I uploaded a picture of the profile in question.  I created a profile called "Toggle Airplane Mode."  What this profile does is that as long as I am not in a call, not connected to my bluetooth in my car, and I am at work, the profile will toggle airplane mode off wait 60 seconds and then toggle airplane mode back on.  This behavior will repeat every 15 minutes between the hours of 7:00 am and 8:40 pm.  On my lock screen, I can see that alarms are being created every 15 minutes when I am at work...perfect!  However, I noticed that alarms are also being created every 15 minutes even when I am not at work (when %work is equal to no) between the hours of 7:00 am and 8:40 pm.  I have confirmed that %work is correctly set to no when I leave work. In fact, even if I shut the profile "Toggle Airplane Mode" off, an alarm is still created every 15 minutes.   I attached a picture of the lock screen showing a scheduled alarm.  The alarms appear to be dummy alarms as they do not do anything and they do not show up when I look for them in the Tasker log.  I thought that if one of the contexts for the profile was false that Tasker would stop and not continue looking at the other contexts within this profile.  Since a "dummy" alarm is created every 15 minutes, this prevents my phone from going into Doze between 7:00 am and 8:40 pm regardless of my location.  After 8:40, the phone will go into Doze mode perfectly.  Do you have any thoughts Pent as to how I can still reliably trigger this profile every 15 minutes, but only when I am at work?  Thanks for any thoughts or suggestions!

Brent
Profile.jpg
Phone.jpg

brent...@gmail.com

unread,
Jan 9, 2017, 7:58:37 PM1/9/17
to Tasker
Hi Pent!  I think I figured it out!  I read the following in the user guide:

When not in Beginner Mode, it's possible to specify a global user variable as the source of the From Time or To Time by clicking on one of the rotating-arrow icons...When the variable value changes, the time context is reevaluated which may result in it activating or deactivating. If the variable value does not specify a valid time then the profile will deactivate (if it's already activated).

What I decided to try was to set a variable called TimeStart and a variable called TimeStop to valid values when work is set to yes.  Upon leaving work, I set TimeStart and TimeStop to the value "N/A" (an invalid value).  Using this invalid value for TimeStart and TimeStop causes the profile to deactivate (although I didn't think it was active anyway since one of the contexts was false) and I no longer get dummy alarms once I leave work!

I do have a couple other questions, but I am going to try to do some research and figure them out.  They also don't specifically relate to the original topic of this discussion and I don't want to hijack my own thread!  I am really learning to love Tasker!  Thanks again Pent!

Brent

On Saturday, January 7, 2017 at 5:06:04 AM UTC-5, Pent wrote:

Pent

unread,
Jan 10, 2017, 4:00:35 AM1/10/17
to Tasker
Thanks for mentioning the repeats breaking doze mode unnecessarily.
Before doze that wasn't such an issue, now it needs some attention.

Pent
Reply all
Reply to author
Forward
0 new messages